float2 texCoord0;
float4 tangentToWorld[3]; // [3x3:tangentToWorld | 1x3:viewDirForParallax]
#if defined(_DOUBLESIDED_LIGHTING_FLIP) || defined(_DOUBLESIDED_LIGHTING_MIRROR)
float cullFace;
/*
#ifdef SHADER_STAGE_FRAGMENT
#if defined(_DOUBLESIDED_LIGHTING_FLIP) || defined(_DOUBLESIDED_LIGHTING_MIRROR)
FRONT_FACE_TYPE cullFace;
#endif
*/
};
struct PackedVaryings
#if defined(_DOUBLESIDED_LIGHTING_FLIP) || defined(_DOUBLESIDED_LIGHTING_MIRROR)
float cullFace : FACE;
/*
#ifdef SHADER_STAGE_FRAGMENT
#if defined(_DOUBLESIDED_LIGHTING_FLIP) || defined(_DOUBLESIDED_LIGHTING_MIRROR)
FRONT_FACE_TYPE cullFace : FRONT_FACE_SEMATIC;
#endif
*/
};
// Function to pack data to use as few interpolator as possible, the ShaderGraph should generate these functions
output.tangentToWorld[1] = input.interpolators[2];
output.tangentToWorld[2] = input.interpolators[3];
/*
*/
return output;
}
output.tangentToWorld[1].w = 0;
output.tangentToWorld[2].w = 0;
/*
#if defined(_DOUBLESIDED_LIGHTING_FLIP) || defined(_DOUBLESIDED_LIGHTING_MIRROR)
output.cullFace = FRONT_FACE_TYPE(0); // To avoid a warning
#endif
*/
return PackVaryings(output);
}
clip(alpha - _Cutoff);
#endif
data.opacity = alpha;
float mettalic = 1.0f;
float mettalic = 1.0;
data.diffuseColor = baseColor * (1.0f - mettalic);
data.diffuseColor = baseColor * (1.0 - mettalic);
float f0_dieletric = 0.04;
data.specularColor = lerp(float3(f0_dieletric, f0_dieletric, f0_dieletric), baseColor, mettalic);
/*
#if defined(_DOUBLESIDED_LIGHTING_FLIP) || defined(_DOUBLESIDED_LIGHTING_MIRROR)
#if defined(_DOUBLESIDED_LIGHTING_FLIP)
float oppositeNormalWS = -data.normalWS;
#ifdef _DOUBLESIDED_LIGHTING_FLIP
float3 oppositeNormalWS = -data.normalWS;
float oppositeNormalWS = reflect(data.normalWS, vertexNormalWS);
float3 oppositeNormalWS = reflect(data.normalWS, vertexNormalWS);
data.normalWS = (input.cullFace > 0.0 ? GetOdddNegativeScale() : -GetOdddNegativeScale()) >= 0.0 ? data.normalWS : oppositeNormalWS;
//data.normalWS = IS_FRONT_VFACE( GetOdddNegativeScale() : -GetOdddNegativeScale()) >= 0.0 ? data.normalWS : oppositeNormalWS;
//data.normalWS = input.cullFace > 0.0 ? data.normalWS : data.normalWS ;
data.normalWS = IS_FRONT_VFACE(input.cullFace, data.normalWS, -data.normalWS) ;
#endif
*/
#elif _MASKMAP // If we have a MaskMap, use emissive slot as a mask on baseColor
data.emissiveColor = data.baseColor * tex2D(_MaskMap, uv).b;
#else
data.emissiveColor = float3(0.0f , 0.0f , 0.0f );
data.emissiveColor = float3(0.0, 0.0, 0.0);
data.subSurfaceRadius = 1.0f ; // tex2D(_SubSurfaceRadiusMap, input.texCoord0).r * _SubSurfaceRadius;
data.subSurfaceRadius = 1.0; // tex2D(_SubSurfaceRadiusMap, input.texCoord0).r * _SubSurfaceRadius;
// TODO
/*