From Jason Daly, "Somehow, one of the shaders in the bsp plugin started behaving incorrectly between the original submission and now. I suspect it has to do with a typo in the setup of the shader that was fixed at some point, or it happened during the recent warnings purge. In any case, I had to invert the usage of a parameter in the shader to make it behave properly again.

The vtf plugin wasn't working in Windows due to OS differences in the byte-packing of the header structure (on Windows, the big block read was causing a buffer overrun).  I fixed this by reading the structure from the file field by field.  It's now happy on both Linux and Windows."
This commit is contained in:
Robert Osfield
2009-01-29 11:18:03 +00:00
parent 2bf68cab53
commit d62c34efe8
2 changed files with 32 additions and 8 deletions

View File

@@ -685,9 +685,9 @@ ref_ptr<StateSet> VBSPReader::createBlendShader(Texture * tex1, Texture * tex2)
" vec4 tex1Color;\n"
" vec4 tex2Color;\n"
"\n"
" tex1Color = texture2D(tex1, gl_TexCoord[0].st) * fBlendParam;\n"
" tex2Color = texture2D(tex2, gl_TexCoord[0].st) *\n"
" tex1Color = texture2D(tex1, gl_TexCoord[0].st) *\n"
" (1.0 - fBlendParam);\n"
" tex2Color = texture2D(tex2, gl_TexCoord[0].st) * fBlendParam;\n"
"\n"
" gl_FragColor = gl_Color * (tex1Color + tex2Color);\n"
"}\n"