您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
20 行
587 B
20 行
587 B
#ifndef __LOADNORMALBUFFER_H__
|
|
#define __LOADNORMALBUFFER_H__
|
|
|
|
#if defined(SHADERPASS) && (SHADERPASS == SHADERPASS_FORWARD)
|
|
void LoadNormalBuffer_float(in float2 positionSS, out float3 normalWS, out float smoothness)
|
|
{
|
|
NormalData normalData;
|
|
DecodeFromNormalBuffer(positionSS.xy, normalData);
|
|
normalWS = normalData.normalWS;
|
|
smoothness = 1.0 - normalData.perceptualRoughness;
|
|
}
|
|
#else
|
|
void LoadNormalBuffer_float(in float2 positionSS, out float3 normalWS, out float smoothness)
|
|
{
|
|
normalWS = float3(0, 0, 1);
|
|
smoothness = 0.5;
|
|
}
|
|
#endif
|
|
|
|
#endif//__LOADNORMALBUFFER_H__
|