{"id":59,"date":"2006-11-01T07:28:03","date_gmt":"2006-11-01T06:28:03","guid":{"rendered":"http:\/\/www.ozone3d.net\/blogs\/lab\/?p=59"},"modified":"2011-09-07T20:47:57","modified_gmt":"2011-09-07T19:47:57","slug":"nvidia-glsl-compiler","status":"publish","type":"post","link":"https:\/\/www.ozone3d.net\/blogs\/lab\/20061101\/nvidia-glsl-compiler\/","title":{"rendered":"NVIDIA GLSL compiler"},"content":{"rendered":"<p>In the demo I received from satyr (see <a href=\"http:\/\/www.ozone3d.net\/smf\/index.php\/topic,172.0.html\">oZone3D.Net forums<\/a>), there is a toon shader that uses glsl uniforms. The pixel shader looked like to:<\/p>\n<pre>\r\nuniform float silhouetteThreshold;\r\n\r\nvoid main()\r\n{\r\n  silhouetteThreshold = 0.32;     \r\n\r\n  \/\/... shader code\r\n  \/\/... shader code\r\n  \/\/... shader code\r\n}\r\n<\/pre>\n<p>This pixel shader compiles well on nVidia gc but generes an error on ati. The error is right since an uniform is a read-only variable. This is an example of the nVidia glsl compiler laxity. That&#8217;s why I code my shader on ati: if the code is good for ati, we can be sure it will be good for nvidia too (of course there are always some exceptions&#8230;)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the demo I received from satyr (see oZone3D.Net forums), there is a toon shader that uses glsl uniforms. The pixel shader looked like to: uniform float silhouetteThreshold; void main() { silhouetteThreshold = 0.32; \/\/&#8230; shader code \/\/&#8230; shader code \/\/&#8230; shader code } This pixel shader compiles well on nVidia gc but generes an error on ati. The error is right since an uniform &hellip; <a href=\"https:\/\/www.ozone3d.net\/blogs\/lab\/20061101\/nvidia-glsl-compiler\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">NVIDIA GLSL compiler<\/span> <span class=\"meta-nav\">&raquo;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[171,18,51],"class_list":["post-59","post","type-post","status-publish","format-standard","hentry","category-opengl","tag-compiler","tag-glsl","tag-nvidia"],"aioseo_notices":[],"views":1349,"_links":{"self":[{"href":"https:\/\/www.ozone3d.net\/blogs\/lab\/wp-json\/wp\/v2\/posts\/59","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ozone3d.net\/blogs\/lab\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ozone3d.net\/blogs\/lab\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ozone3d.net\/blogs\/lab\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ozone3d.net\/blogs\/lab\/wp-json\/wp\/v2\/comments?post=59"}],"version-history":[{"count":0,"href":"https:\/\/www.ozone3d.net\/blogs\/lab\/wp-json\/wp\/v2\/posts\/59\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ozone3d.net\/blogs\/lab\/wp-json\/wp\/v2\/media?parent=59"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ozone3d.net\/blogs\/lab\/wp-json\/wp\/v2\/categories?post=59"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ozone3d.net\/blogs\/lab\/wp-json\/wp\/v2\/tags?post=59"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}