committed by
Mathias Agopian
parent
0a6886e43b
commit
9914eb84a4
@@ -1936,7 +1936,7 @@ The following APIs are only available from the fragment block:
|
||||
**getWorldNormalVector()** | float3 | Normalized normal in world space, after bump mapping (must be used after `prepareMaterial()`)
|
||||
**getWorldGeometricNormalVector()** | float3 | Normalized normal in world space, before bump mapping (can be used before `prepareMaterial()`)
|
||||
**getWorldReflectedVector()** | float3 | Reflection of the view vector about the normal (must be used after `prepareMaterial()`)
|
||||
**getNormalizedViewportCoord()** | float2 | Normalized viewport position (i.e. clip-space position normalized to [0, 1], can be used before `prepareMaterial()`)
|
||||
**getNormalizedViewportCoord()** | float3 | Normalized viewport position (i.e. NDC coordinates normalized to [0, 1], can be used before `prepareMaterial()`)
|
||||
**getNdotV()** | float | The result of `dot(normal, view)`, always strictly greater than 0 (must be used after `prepareMaterial()`)
|
||||
**getColor()** | float4 | Interpolated color of the fragment, if the color attribute is required
|
||||
**getUV0()** | float2 | First interpolated set of UV coordinates, only available if the uv0 attribute is required
|
||||
|
||||
@@ -101,7 +101,7 @@ highp vec3 getLightSpacePosition() {
|
||||
* @public-api
|
||||
*/
|
||||
highp vec3 getNormalizedViewportCoord() {
|
||||
// make sure handle our reversed-z
|
||||
// make sure to handle our reversed-z
|
||||
return vec3(shading_normalizedViewportCoord, 1.0 - gl_FragCoord.z);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user