mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2024-12-02 08:51:57 +00:00
Merge pull request #143 from jonathangray/mesa-shader-fix
make a shader work with Mesa by avoiding an implicit type conversion
This commit is contained in:
commit
77f65454f2
2 changed files with 2 additions and 2 deletions
|
@ -249,7 +249,7 @@ void main( PS_IN fragment, out PS_OUT result )
|
|||
float shadow = 0.0;
|
||||
|
||||
// RB: casting a float to int and using it as index can really kill the performance ...
|
||||
int numSamples = 12; //int(rpScreenCorrectionFactor.w);
|
||||
float numSamples = 12.0; //int(rpScreenCorrectionFactor.w);
|
||||
float stepSize = 1.0 / numSamples;
|
||||
|
||||
float4 jitterTC = ( fragment.position * rpScreenCorrectionFactor ) + rpJitterTexOffset;
|
||||
|
|
|
@ -4424,7 +4424,7 @@ static const cgShaderDef_t cg_renderprogs[] =
|
|||
" float shadow = 0.0;\n"
|
||||
" \n"
|
||||
" // RB: casting a float to int and using it as index can really kill the performance ...\n"
|
||||
" int numSamples = 12; //int(rpScreenCorrectionFactor.w);\n"
|
||||
" float numSamples = 12.0; //int(rpScreenCorrectionFactor.w);\n"
|
||||
" float stepSize = 1.0 / numSamples;\n"
|
||||
" \n"
|
||||
" float4 jitterTC = ( fragment.position * rpScreenCorrectionFactor ) + rpJitterTexOffset;\n"
|
||||
|
|
Loading…
Reference in a new issue