| Summary: | sin and cos is broken | ||
|---|---|---|---|
| Product: | Mesa | Reporter: | Christopher Egert <cme3000> |
| Component: | Drivers/Gallium/i915g | Assignee: | Default DRI bug account <dri-devel> |
| Status: | RESOLVED NOTABUG | QA Contact: | |
| Severity: | normal | ||
| Priority: | medium | ||
| Version: | git | ||
| Hardware: | Other | ||
| OS: | All | ||
| Whiteboard: | |||
| i915 platform: | i915 features: | ||
|
Description
Christopher Egert
2012-06-25 13:00:11 UTC
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 |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.