From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 51421] sin and cos is broken Date: Tue, 27 Nov 2012 11:26:26 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0142894485==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id C81BCE5C12 for ; Tue, 27 Nov 2012 03:26:26 -0800 (PST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0142894485== Content-Type: multipart/alternative; boundary="1354015586.A6f5030.25780"; charset="us-ascii" --1354015586.A6f5030.25780 Date: Tue, 27 Nov 2012 11:26:26 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable https://bugs.freedesktop.org/show_bug.cgi?id=3D51421 Golubev Yaroslav changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |NOTABUG --- Comment #1 from Golubev Yaroslav --- 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 =3D gl_FragCoord.x/resolution.x;=20 > float value =3D sin((bla-0.5)*100.0); > gl_FragColor =3D 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 =3D> float value =3D abs(sin(radians((bla-0.5)*100.0))); works fine --=20 You are receiving this mail because: You are the assignee for the bug. --1354015586.A6f5030.25780 Date: Tue, 27 Nov 2012 11:26:26 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Golubev Yaroslav changed bug 51421<= /a>
What Removed Added
Status NEW RESOLVED
Resolution --- NOTABUG

Comment= # 1 on bug 51421<= /a> from Golubev Yaroslav
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 =3D gl_FragCoord.x/resolution.x;=20
>	float value =3D sin((bla-0.5)*100.0);
>	gl_FragColor =3D 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

=3D> float value =3D abs(sin(radians((bla-0.5)*100.0)));
works fine


You are receiving this mail because: =20=20=20=20=20=20
  • You are the assignee for the bug.
--1354015586.A6f5030.25780-- --===============0142894485== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============0142894485==--