[Bug 51421] sin and cos is broken

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



changed bug 51421
What Removed Added
Status NEW RESOLVED
Resolution --- NOTABUG

Comment # 1 on bug 51421 from
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:
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux