Unity toony colors pro 28/11/2023 ![]() ![]() Here is the man texture, normal map and occlusion map for reference:Īs you can see he's just flat colour. I also edited the hard ramp to make it harder, but even though I only have half pure white and half pure black with one pixel of grey in the middle I'm still seeing more than 2 shades of light: I changed the ramp textures to point filter in import setting and this fixed the issues. What would you recommend to eliminate these artefacts? Should the ramp texture be a power of 2 quad? Here is the Toony PBS shader with ramp enabled:Īs you can see the ramp texture gives me more hard edges which is what I want, but it also introduces a lot of artefacts. Here is the standard shader for reference: I created a quad and attached the normal map and albedo for a simple pixel character.īoth albedo and normals are set to point no filter no mip maps. Nice to see ramps on the point lights and also on the directional light. ![]() Half diffuseTerm = nl // disneyDiffuse * nl įinal result is simple pixel perfect directional/ambient lighting: I've written down to add support for this in a future version. This is a common problem with transparency and currently this is not doable automatically with TCP2. If Stencil works fine with your mesh, I say go with that option.įor those techniques, just add the following code in your shader at the beginning of the Subshader block: Here is a visual comparison between the different techniques:ĭepth gives the best result, but is less performant. This does add a new pass in the shader though, and it will interfere with post effects that rely on the depth texture. Another solution is to insert a depth-only pass in the shader, so that the depth is correctly taken into account during the transparency rendering pass, as outlined in Unity's documentation.The stencil solution outlined in your second link should work, but it can introduce problems if one part of the mesh that is behind the rest is rendered first (basically the stencil method will 'mark' each drawn pixel so that it never gets written to twice with that shader, but you can't control the rendering order of the mesh's triangles).In the meantime, you can try to fix that manually - I see two relatively easy ways to do this: Click to expand.This is a common problem with transparency and currently this is not doable automatically with TCP2. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |