logo6.jpg

HL2GLSL is a sub project of NDOS Project

Video presentation: http://br.youtube.com/watch?v=46Tf8M-h2Y8

br.png Descrição do Projeto

HL2GLSL é um aplicativo para converter código da linguagem High Level Shading Language para a linguagem OpenGL Shading Language, auxiliando o porte de jogos e aplicativos gráficos construídos para executarem em ambientes Windows para ambientes Linux/MacOS. Ambas as linguagens são também utilizadas para processamento paralelo, pois executam diretamente nas placas gráficas. O projeto esta sendo construído utilizando a linguagem C#, a IDE MonoDevelop e o framework para geração de compiladores Grammatica.

Para maiores informações sobre Shaders, leia: http://www.vvvv.org/tiki-index.php?page=User+Shaders

usa.png Project Description

HL2GLSL is a translator between High Level Shading Language and OpenGL Shading Language. Since, the HLSL shaders runs only in Microsoft Windows OS, the project aims to help game developers port their games to the Linux and MacOS systems. Both languages are also used to parallel processing in general purpose applications. The project uses C#, the Grammatica compiler compiler and the MonoDevelop IDE.

For more information about Shaders, see: http://www.vvvv.org/tiki-index.php?page=User+Shaders

See Also: Blog, HLSL BNF, Parsing Shaders, Development Tips, Differences Between HLSL and GLSL,GLSL Debugger,Work Plan
Last edited Oct 30 2008 at 2:19 AM by bellaver, version 24
Comments
toneburst wrote  Apr 24 2008 at 4:01 PM 
Hi,

just a quick question, how do you deal with the preset HLSL transformation matrices that don't have a direct equivalent in GLSL?
I'm thinking of
WORLD
VIEW
PROJECTION
VIEWPROJECTION
WORLDVIEWPROJECTION
WORLDVIEW

Cheers,

alx
http://machinesdontcare.wordpress.com

vfpamp wrote  May 9 2008 at 1:03 AM 
Hello,

The semantic information about the current state of OpenGL/DirectX matrices are obtained in GLSL from a set of built in variables:

uniform mat4 gl_ModelViewMatrix;
uniform mat4 gl_ProjectionMatrix;
uniform mat4 gl_ModelViewProjectionMatrix;
uniform mat4 gl_ModelViewMatrixInverse;
uniform mat4 gl_ProjectionMatrixInverse;
uniform mat4 gl_ModelViewProjectionMatrixInverse;
uniform mat4 gl_ModelViewMatrixTranspose;
uniform mat4 gl_ProjectionMatrixTranspose;
uniform mat4 gl_ModelViewProjectionMatrixTranspose;
uniform mat4 gl_ModelViewMatrixInverseTranspose;
uniform mat4 gl_ProjectionMatrixInverseTranspose;
uniform mat4 gl_ModelViewProjectionMatrixInverseTranspose;

So, we just need to replace the semantical tokens (e.g. world : WORLDVIEW) to predeclared variables (e.g. uniform mat4 gl_ModelViewMatrix)

Thanks,

Updating...
© 2006-2009 Microsoft | About CodePlex | Privacy Statement | Terms of Use | Code of Conduct | CodePlex Blog | Version 2008.12.9.14291