[Bug 51421] sin and cos is broken
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Nov 27 03:26:26 PST 2012
https://bugs.freedesktop.org/show_bug.cgi?id=51421
Golubev Yaroslav <My3blkant50 at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |NOTABUG
--- Comment #1 from Golubev Yaroslav <My3blkant50 at gmail.com> ---
http://glsl.heroku.com/e#2465.1
>#ifdef GL_ES
>precision mediump float;
>#endif
>uniform float time;
>uniform vec2 mouse;
>uniform vec2 resolution;
>
>void main( void ) {
> float bla = gl_FragCoord.x/resolution.x;
> float value = sin((bla-0.5)*100.0);
> gl_FragColor = vec4(value,value,value, 1.0 );
>}
1) according to specification sin accepts angle in radians:
2) also gl_FragColor.# should be in [0;1], but sin (x in (0;-pi))<0
=> float value = abs(sin(radians((bla-0.5)*100.0)));
works fine
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20121127/439f074a/attachment.html>
More information about the dri-devel
mailing list