Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
default-material [2020/01/13 15:22] – [Using Defines] admin | default-material [2020/01/17 11:30] – [Globally available variables] admin | ||
---|---|---|---|
Line 413: | Line 413: | ||
=== Shader Locals === | === Shader Locals === | ||
- | ^Name ^Type ^ Description ^ | + | |
- | | l_Ambient| vec3 | Ambient light color (only in lights loop) | | + | == VertexShader == |
- | | l_Diffuse| vec3 | Diffuse light color (only in lights loop) | | + | ^Name ^Type ^Shader ^Description ^ |
- | | l_Specular | vec3 | Specular light color (only in lights loop) | | + | | l_Position | vec4 | VS | MVP transformed vertex position | |
- | | l_SpecularColor | vec3 | Specular material color (from texture or computed) | | + | | l_Displace | vec3 | VS | Raw disposition value from displacement map. Use TGorillaGLSLDisplacementMappingGetNode and TGorillaGLSLDisplacementMappingApplyNode to manipulate displacement | |
- | | l_TexCoord0 | vec2 | transformed and tiled first texture coordinate | | + | |
- | | l_BaseColor | + | == FragmentShader == |
- | | l_Alpha | float | Final alpha output value - combine with l_SumColor | | + | ^Name ^Type ^Shader |
- | | l_SumColor | vec3 | Final RGB output value - combine with l_Alpha | | + | | l_Ambient| vec3 | FS | Ambient light color (only in lights loop) | |
- | | l_Position | vec4 | MVP transformed vertex position | + | | l_Diffuse| vec3 | FS | Diffuse light color (only in lights loop) | |
- | | l_Shading | vec2 | Multiple light combined value | | + | | l_Specular | vec3 | FS | Specular light color (only in lights loop) | |
- | | l_LightDir | vec4 | Direction of light (only in lights loop) | | + | | l_SpecularColor | vec3 | FS | Specular material color (from texture or computed) | |
- | | l_LightVec | vec3 | Light vector (only in lights loop) | | + | | l_TexCoord0 | vec2 | FS | transformed and tiled first texture coordinate | |
- | | l_LightType | int | Type of light (point, direction or spot light) (only in lights loop) | | + | | l_Tiling0 |
- | | l_LightDist | float | Distance to light source | + | | l_Shading | vec2 | FS | Multiple light combined value | |
- | | l_Attenuation | float | Computed light attenuation (only in lights loop) | | + | | l_LightDir | vec4 | FS | Direction of light (only in lights loop) | |
- | | l_BumpSum | vec2 | Bump-Mapping for each light source | | + | | l_LightVec | vec3 | FS | Light vector (only in lights loop) | |
+ | | l_LightType | int | FS | Type of light (point, direction or spot light) (only in lights loop) | | ||
+ | | l_LightDist | float | FS | Distance to light source | ||
+ | | l_Attenuation | float | FS | Computed light attenuation (only in lights loop) | | ||
+ | | l_BumpSum | vec2 | FS | Bump-Mapping for each light source | ||
+ | | l_BaseColor | vec4 | FS | Diffuse texture color / vertex color / computed color | | ||
+ | | l_Alpha | float | FS | Final alpha output value - combine with l_SumColor | | ||
+ | | l_SumColor | vec3 | FS | Final RGB output value - combine with l_Alpha | ||
===== Properties ===== | ===== Properties ===== |