From: <bug...@fr...> - 2010-03-24 11:36:50
|
http://bugs.freedesktop.org/show_bug.cgi?id=27286 Summary: Mod function returns wrong value Product: Mesa Version: unspecified Platform: Other OS/Version: All Status: NEW Severity: normal Priority: medium Component: Mesa core AssignedTo: mes...@li... ReportedBy: kar...@ar... The following shader returns incorrect output. It looks like the GLSL Compiler doesnt implement mod correctly. varying vec var1; void main (void) { gl_FragColor = vec4(mod(4.0, 2.0), 0.0, 0.0, 1.0); } It should be the same as, varying vec var1; void main (void) { float var = 4.0 - (2.0 * (floor(4.0/2.0)) ); //According to spec gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0); } -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. |