Surface Shader optional directives reference for the Built-In Render Pipeline
Shader methods in the Built-In Render Pipeline
Surface Shader input structure reference for the Built-In Render PipelineThe input structure Input
generally has any texture coordinates needed by the shaderA program that runs on the GPU. More info
See in Glossary. Texture coordinates must be named âuv
â followed by texture name (or start it with âuv2
â to use second texture coordinate set).
Additional values that can be put into Input structure:
float3 viewDir
- contains view direction, for computing Parallax effects, rim lighting etc.float4
with COLOR
semantic - contains interpolated per-vertex color.float4 screenPos
- contains screen space position for reflection or screenspace effects. Note that this is not suitable for GrabPass; you need to compute custom UV yourself using ComputeGrabScreenPos
function.float3 worldPos
- contains world space position.float3 worldRefl
- contains world reflection vector if surface shaderA streamlined way of writing shaders for the Built-in Render Pipeline. More infofloat3 worldNormal
- contains world normal vector if surface shader does not write to o.Normal.float3 worldRefl; INTERNAL_DATA
- contains world reflection vector if surface shader writes to o.Normal. To get the reflection vector based on per-pixel normal mapA type of Bump Map texture that allows you to add surface detail such as bumps, grooves, and scratches to a model which catch the light as if they are represented by real geometry.WorldReflectionVector (IN, o.Normal)
. See Reflect-Bumped shader for example.float3 worldNormal; INTERNAL_DATA
- contains world normal vector if surface shader writes to o.Normal. To get the normal vector based on per-pixel normal map, use WorldNormalVector (IN, o.Normal)
.Surface Shader optional directives reference for the Built-In Render Pipeline
Shader methods in the Built-In Render Pipeline
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4