I’m trying to do a modulo on two floats, but the shader compiler complains.
error(#162) Wrong operand types no operation ‘%’ exists that takes a left-hand operand of type ‘float’ and a right operand of type ‘float’ (or there is no acceptable conversion).
The code that causes this is:
vec2 pixelOffset = vec2(shadowCoord.x % invShadowSize, shadowCoord.y % invShadowSize);
It is strange that the modulo operation does not work on floats, it certianly does in DirectX.