소스 검색

Merge pull request #1536 from Azaezel/flagFix

opengl crashfix pow(x,y) needed to be passed matching vartypes.
Anis 9 년 전
부모
커밋
c90dcdf54b
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      Templates/Full/game/shaders/common/gl/torque.glsl

+ 3 - 3
Templates/Full/game/shaders/common/gl/torque.glsl

@@ -285,11 +285,11 @@ void fizzle(vec2 vpos, float visibility)
 #define assert(condition, color) { if(!any(condition)) { OUT_col = color; return; } }
 
 // Deferred Shading: Material Info Flag Check
-bool getFlag(float flags, int num)
+bool getFlag(float flags, float num)
 {
    float process = round(flags * 255);
-   float squareNum = pow(2, num);
-   return (mod(process, pow(2, squareNum)) >= squareNum); 
+   float squareNum = pow(2.0, num);
+   return (mod(process, pow(2.0, squareNum)) >= squareNum); 
 }
 
 // #define TORQUE_STOCK_GAMMA