Replace TownSquare with HomeCamp art and land humanoid bots, LittleBear, and LmGirl review assets.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -17,10 +17,13 @@ half _BumpScale;
|
||||
half _Roughness;
|
||||
half _Metallic;
|
||||
half _AO;
|
||||
half _EmissiveIntensity;
|
||||
half _useCustomGI;
|
||||
half3 _CustomGIColor;
|
||||
half _EmissiveIntensity;
|
||||
half _useCustomGI;
|
||||
half3 _CustomGIColor;
|
||||
float4 _LayerTex0_TexelSize;
|
||||
half _LightmapContrast;
|
||||
half _LightmapShadeMul;
|
||||
half3 _LightmapShadeTint;
|
||||
CBUFFER_END
|
||||
half _XRuntimeAmbientEnabled;
|
||||
half4 _XRuntimeAmbientSky;
|
||||
@@ -144,13 +147,22 @@ void InitializeInputData(Varyings input, half3 normalTS, out InputData inputData
|
||||
inputData.bakedGI = SAMPLE_GI(input.staticLightmapUV, input.dynamicLightmapUV, input.vertexSH, inputData.normalWS);
|
||||
#elif defined(LIGHTMAP_ON)
|
||||
inputData.bakedGI = SAMPLE_GI(input.staticLightmapUV, input.vertexSH, inputData.normalWS);
|
||||
// Open crushed shade: gamma < 1 + cool fill into darks so plaza shade stays PBR, not ink.
|
||||
{
|
||||
half3 gi = max(inputData.bakedGI, half3(0, 0, 0));
|
||||
gi = pow(gi, max(_LightmapContrast, half(0.05)));
|
||||
half lum = saturate(dot(gi, half3(0.2126h, 0.7152h, 0.0722h)));
|
||||
half3 fill = _LightmapShadeTint * max(_LightmapShadeMul, half(0.05)) * half(0.22);
|
||||
inputData.bakedGI = gi + fill * (half(1) - lum);
|
||||
}
|
||||
#else
|
||||
inputData.bakedGI = SampleSH(inputData.normalWS);
|
||||
#endif
|
||||
// 仅在运行时全局环境光开启后才覆盖(Game.cs 设置);否则保留场景自身 SH/光照贴图,
|
||||
// 避免编辑器预览比 URP Lit 亮(旧写法无条件覆盖成硬编码的高强度三色环境光)
|
||||
// Runtime ambient is for probe/SH meshes only — never replace lightmaps (that erases baked cast shadows).
|
||||
#if !defined(LIGHTMAP_ON) && !defined(DYNAMICLIGHTMAP_ON)
|
||||
if (_XRuntimeAmbientEnabled > 0.5h)
|
||||
inputData.bakedGI = SampleXRuntimeAmbient(inputData.normalWS);
|
||||
#endif
|
||||
|
||||
inputData.normalizedScreenSpaceUV = GetNormalizedScreenSpaceUV(input.positionCS);
|
||||
inputData.shadowMask = SAMPLE_SHADOWMASK(input.staticLightmapUV);
|
||||
|
||||
Reference in New Issue
Block a user