Category Archives: GLSL

How To Linearize the Depth Value

Here is a GLSL code snippet to convert the exponential depth to a linear value: float f=1000.0; float n = 0.1; float z = (2 * n) / (f + n – texture2D( texture0, texCoord ).x * (f – n)); … Continue reading

Posted in GLSL | Tagged , , , | Leave a comment

The Art of Texturing in GLSL is Now a Resource of OpenGL.org

The tutorial The Art of Texturing Using the OpenGL Shading Language has been included in OpenGL.org website in OpenGL API OpenGL Shading Language Sample Code & Tutorials section. Rather cool…

Posted in GLSL | Tagged , , , | 1 Comment

Vertex Displacement Mapping in GLSL Now Available on Radeon!

As I said in this news, the release of Catalyst 8.10 BETA comes with a nice bugfix: vertex texture fetching is now operational on Radeon (at least on my Radeon HD 4850). From 2 or 3 months, Catalyst makes it … Continue reading

Posted in GLSL, OpenGL | Tagged , , , , , , , | 1 Comment

Saturate function in GLSL

During the conversion of shaders written in Cg/HLSL, we often find the saturate() function. This function is not valid in GLSL even though on NVIDIA, the GLSL compiler accepts it (do not forget that NVIDIA’s GLSL compiler is based on … Continue reading

Posted in GLSL, Programming | Tagged , , , , , , , , | 3 Comments

Velvet Shader Preview

Are you ready for a small velvet GLSL shader? Here’s one, at least a preview of the one I’ve just coded for a demo with Smode. Smode… a software dedicated to create… demos! And the cool thing, is that Smode … Continue reading

Posted in GLSL, Programming, TechDemo | Tagged , , , , , | 2 Comments

GLSL support in Intel graphics drivers

A user from oZone3D.Net forum asked me some info about the GLSL support of Intel graphics chips. It’s wellknown (sorry Intel) that Intel has a bad OpenGL support in its Windows drivers and even if Intel’s graphics drivers support OpenGL … Continue reading

Posted in Drivers, GLSL, Programming | Tagged , , , , , | Leave a comment

GLSL float to RGBA8 encoder

Packing a [0-1] float value into a 4D vector where each component will be a 8-bits integer: vec4 packFloatToVec4i(const float value) { const vec4 bitSh = vec4(256.0*256.0*256.0, 256.0*256.0, 256.0, 1.0); const vec4 bitMsk = vec4(0.0, 1.0/256.0, 1.0/256.0, 1.0/256.0); vec4 res … Continue reading

Posted in GLSL, Programming | Tagged , , | Leave a comment

Quick Review – Lumina – GLSL studio

Je viens de m’amuser un peu avec Lumina. C’est un petit environnement de mise au point de shader GLSL. Le projet demarre et il y a encore pas mal de petites coquilles (essayez de charger plusieurs projets les uns à … Continue reading

Posted in GLSL, OpenGL, Reviews, Software | Tagged , , , , | Leave a comment

GLSL: ATI vs NVIDIA – Part…

While I was releasing the Julia’s Fractal demo, I tested it on NVIDIA and ATI (as usual before releasing a demo). And as usual, a new difference appeared in the way the GLSL is supported on ATI and on NVIDIA. … Continue reading

Posted in GLSL | Tagged , , , | 1 Comment

Catalyst 8.1 GLSL lighting bug fixed

The previous catalyst (7.11 / 7.12) had a nasty bug in dynamic lights management in GLSL. I’ve just tested the latest Catalyst 8.1 WHQL with the Demoniak3D demo I coded for, and the bug has been fixed. In the release … Continue reading

Posted in Drivers, GLSL | Tagged , , , , , | Leave a comment