-
Posts
4159 -
Joined
-
Last visited
-
Days Won
50
Posts posted by duzenko
-
-
Here's an example of my depth shader, for reference. You might want to start with it and build on it.
//layout (location=1) uniform vec4 clipPlane; uniform vec4 clipPlane; //layout (location=8) in vec2 tc0; in vec2 tc0; varying float clipPlaneDist; void main() { gl_TexCoord[0] = vec4(tc0, 0, 0); gl_FrontColor = gl_Color; clipPlaneDist = dot(gl_Vertex, clipPlane); gl_Position = ftransform(); }
uniform sampler2D tex0; //layout (location=2) uniform float alphaTest; uniform float alphaTest; varying float clipPlaneDist; void main() { if (clipPlaneDist < 0.0) discard; vec4 tex = texture2D(tex0, gl_TexCoord[0].st); if (tex.a <= alphaTest) discard; gl_FragColor = tex*gl_Color; }
-
How do you plug a glsl shader into a material? Is it exactly like the ARB ones?
You or someone could also take a idtech ARB shader convert it into the GLSL version and explain all the steeps needed to do that.
Btw i'm not asking for you or someone to teach how to convert ARB into GLSL per se, what i'm asking is more how the conections to the engine render and materials are between the ARB and the GLSL version.
I have not done any material shader but for now let's assume it's going to be the same as existing darkmod ARB shaders.
Are you looking to create a new shader or convert an existing one?
I think attrib[8] could be TexCoord1, etc.
Env[16] - Env16, etc.
I don't think user-supplied per material support for GLSL has been added yet based on a quick survey of the code.
It looks we just have backend GLSL right now (which is still quite useful).
There has been no requests yet but it's already technically possible.
Just let's agree to call a glsl shader by file name with no extension, i.e.
program fresnel
This way the engine knows it's a glsl program located in two files: fresnel.vp and fresnel.fp. Compare to fresnel.vfp that contains both shaders in ARB assembly.
-
The WannaCrypt exploits used in the attack were drawn from the exploits stolen from the National Security Agency, or NSA, in the United States.
What THE HELL do they mean by "exploits stolen from NSA"?
-
Some would suggest skipping both and going to OpenCL but there's still not enough support there yet as I recall.
One thing I always wondered is - can we use OpenCL to get rid of near clipping plane in projection matrix similar to how the far plane became obsolete a decade ago.
The GPU only works in 4-coordinate space, and does a non-optional hardware w-division.
If only there was a way to work around that.
-
Does GLSL improve or heaven forbid, degrade performance?
Is 2017 C slower or faster than 1987 assembler?
For me, the main difference is support of branches (and loops) that ARB assembly is missing. Other than that I was very happy with it.
Then, there's the deprecated stuff issue. I want to get rid of TexGens, etc.
-
Wow... I did not expect my thread to inspire anyone to do any engine changes so quickly. That's awesome to hear, thank you duzenko! Can you post any screenshots please?
It looks exactly the same as before, which is good. I only replaced existing fixed pipeline/arb with glsl. Adding eye-candies is not my specialty.
-
GLSL support added.
I will try write glsl shaders if it ever gets implemented in TDM, but good documentation needs to be made by who implements a GLSL render, about how all of it is connected into the engine and how shaders are plugged into materials, etc.
What kind of documentation would you like?
Assets svn now has depthAlpha.vp/fp GLSL shader as proof of concept. It's already used by the svn exe.
-
2
-
-
It is but glsl is not C.
-
Heads up: I'm in the middle of adding GLSL support, depth stage as the first step.
It half works right now.
-
1
-
-
Curious: first thing I looked at the depth shader on things I did recently.
1) can't see code that would clip a mirror near plane.
2) can't see where the referenced clip() function is defined
3) how is #define implemented? AFAIK it's not standard GLSL
4) is there support for vegetation LOD alpha-test? Can't see it.
Git status is WIP but last change was year ago. How finished is it generally?
-
I would like to see the glsl support very much. Porting ARB to glsl can't be too hard.
Correct me if I'm wrong but the real problem is going to be replacing all legacy stuff like modelview and texture matrixes, texgens, global vs per vertex colors and normals, etc. I presume that GLSL backend includes all of that?
-
Pff, try searching for piratebay.
-
I was trying to make that area look a lot large without needing to build it and draw alot more tris. I figured just drawing
a screen would be a lot cheaper performance wise.
Unless you actually put a static picture on it I can't see possibility of performance gain.
-
Definitely worth trying console command g_enablePortalSky 1.
If that and materials does not help then we should pronounce 2.05 incompatible with remote cameras.
-
Anyone ever used cameras in TDM missions?
In terms of performance, do you think it is going to be faster? I think camera is being updated each frame so one way or another it is always drawing everything.
Does the camera still work after save/load? It does not for me.
...
Regarding your problem (parasite pixels in the skybox).
I think it's caused by the water shader in the camera view. It requires to save the current frame to the texture that is also used by the skybox pass.
What you could try here is use a simpler, non-post-processing material for water in the camera area.
-
g_enablePortalSky is a console command.
Did you try to put an opaque solid wall behind the mirror?
-
Try g_enablePortalSky 0, 1, 2, -1
Or upload the map somewhere so that we could look at it.
-
Anything I can do to help here?
-
Tried glprocs one by one until replacing texcoord with attrib[8] in heatHaze.vfp fixed the waves.
-
2
-
-
My bad.
Simple ambient does not work on Intel either.
-
ambientLight.vfp has been fixed for the texcoord vs vertex attrib change?
If that is the enhanced ambient then yes.
Simple ambient works on Intel but not on AMD.
Water does not work on both but works for you (nvidia?)
-
On my work AMD entire map looks screwed up...
It's the ambient method. Simple looks very bad now on AMD.
-
Building with the latest source (6845), the windows are back to normal, but the skybox texture is still hosed.
Fixed the TG_WOBBLESKY_CUBE path
-
Hmm. The water looks like it did before to me?
As I recall, the material def has "vertexParm 0" which controls the speed.
Edit.
Apparently parm5 and parm6
Are you using the latest assets? Waves are completely broken for me.
...
On my work AMD entire map looks screwed up...
...
Phew, that was my config. Now only water waves are broken
fhDOOM engine improvements
in TDM Tech Support
Posted
Can we just copy paste glsl from https://github.com/raynorpat/Doom3/tree/master/base/renderprogs?