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:
Robert Beckebans 2014-07-21 10:00:16 +02:00
commit 77f65454f2
2 changed files with 2 additions and 2 deletions

View file

@ -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;

View file

@ -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"