cartoon shader: disable ssao, ssr, improved rim light; vrm mtoon will enable cartoon shader;
This commit is contained in:
@@ -2151,7 +2151,6 @@ void Import_Extension_VRM(LoaderState& state)
|
||||
}
|
||||
}
|
||||
|
||||
#if 0 // todo toon shading parameters
|
||||
if (ext_vrm->second.Has("materialProperties"))
|
||||
{
|
||||
const auto& materialProperties = ext_vrm->second.Get("materialProperties");
|
||||
@@ -2183,7 +2182,6 @@ void Import_Extension_VRM(LoaderState& state)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -39,11 +39,13 @@ float4 main(VertexToPixel input) : SV_Target
|
||||
#ifndef PREPASS
|
||||
#ifndef ENVMAPRENDERING
|
||||
#ifndef TRANSPARENT
|
||||
#ifndef CARTOON
|
||||
[branch]
|
||||
if (GetCamera().texture_ao_index >= 0)
|
||||
{
|
||||
surface.occlusion *= bindless_textures_float[GetCamera().texture_ao_index].SampleLevel(sampler_linear_clamp, ScreenCoord, 0).r;
|
||||
}
|
||||
#endif // CARTOON
|
||||
#endif // TRANSPARENT
|
||||
#endif // ENVMAPRENDERING
|
||||
#endif // PREPASS
|
||||
|
||||
@@ -1211,11 +1211,13 @@ float4 main(PixelInput input, in bool is_frontface : SV_IsFrontFace) : SV_Target
|
||||
#ifndef PREPASS
|
||||
#ifndef ENVMAPRENDERING
|
||||
#ifndef TRANSPARENT
|
||||
#ifndef CARTOON
|
||||
[branch]
|
||||
if (GetCamera().texture_ao_index >= 0)
|
||||
{
|
||||
surface.occlusion *= bindless_textures_float[GetCamera().texture_ao_index].SampleLevel(sampler_linear_clamp, ScreenCoord, 0).r;
|
||||
}
|
||||
#endif // CARTOON
|
||||
#endif // TRANSPARENT
|
||||
#endif // ENVMAPRENDERING
|
||||
#endif // PREPASS
|
||||
@@ -1391,12 +1393,14 @@ float4 main(PixelInput input, in bool is_frontface : SV_IsFrontFace) : SV_Target
|
||||
#ifndef WATER
|
||||
#ifndef ENVMAPRENDERING
|
||||
#ifndef TRANSPARENT
|
||||
#ifndef CARTOON
|
||||
[branch]
|
||||
if (GetCamera().texture_ssr_index >= 0)
|
||||
{
|
||||
float4 ssr = bindless_textures[GetCamera().texture_ssr_index].SampleLevel(sampler_linear_clamp, ScreenCoord, 0);
|
||||
lighting.indirect.specular = lerp(lighting.indirect.specular, ssr.rgb * surface.F, ssr.a);
|
||||
}
|
||||
#endif // CARTOON
|
||||
#endif // TRANSPARENT
|
||||
#endif // ENVMAPRENDERING
|
||||
#endif // WATER
|
||||
|
||||
@@ -229,7 +229,7 @@ struct Surface
|
||||
ab = max(0, roughnessBRDF * (1 - anisotropy));
|
||||
|
||||
#ifdef CARTOON
|
||||
F = smoothstep(0.05, 0.1, F);
|
||||
F = smoothstep(0.1, 0.5, F);
|
||||
#endif // CARTOON
|
||||
}
|
||||
|
||||
|
||||
@@ -94,6 +94,7 @@ void main(uint Gid : SV_GroupID, uint groupIndex : SV_GroupIndex)
|
||||
|
||||
TiledLighting(surface, lighting, tile.entity_flat_tile_index);
|
||||
|
||||
#ifndef CARTOON
|
||||
[branch]
|
||||
if (GetCamera().texture_ssr_index >= 0)
|
||||
{
|
||||
@@ -105,6 +106,7 @@ void main(uint Gid : SV_GroupID, uint groupIndex : SV_GroupIndex)
|
||||
{
|
||||
surface.occlusion *= bindless_textures_float[GetCamera().texture_ao_index].SampleLevel(sampler_linear_clamp, surface.screenUV, 0).r;
|
||||
}
|
||||
#endif // CARTOON
|
||||
|
||||
float4 color = 0;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace wi::version
|
||||
// minor features, major updates, breaking compatibility changes
|
||||
const int minor = 71;
|
||||
// minor bug fixes, alterations, refactors, updates
|
||||
const int revision = 54;
|
||||
const int revision = 55;
|
||||
|
||||
const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user