mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-01-21 08:51:21 +00:00
avoid an implicit type conversion in a shader
renderprogs/interactionSM.pixel does not compile with the Mesa shader compiler due to a an implicit type conversion. This gives a console warning on a release build and fatally asserts on an debug build: 0:135(19): error: could not implicitly convert operands to arithmetic operator Avoid this by changing an int declaration to a float.
This commit is contained in:
parent
485edfebc1
commit
79b8e04e95
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