New answers tagged

0

The LWRP shader in your project uses "Color Mode: Additive" while the standard shader in the LWRP project uses "Color Mode: Multiply". The result is that those areas where a lot of particles with a very low intensity accumulate create a halo in your shader.


0

If your cards are sprite you should use TextMesh because Text Component made for UI Elements. Sprite Solution Create a world space Canvas and child it to card sprite. Use Sprite Mask Select Visible Inside Mask Change the Stencil buffer to cut the text Enjoy! UI Solution your game is a card game so you should use UI Elements Instead. you can mask ...


0

The answer for me myself is "simply" using the so called stencil-buffer, which is a feature in OpenGL. By simplifying the question to "how to clip something behind a wall in 2D" I was able to find the feature and use it. By adding the region in front of the wall (or portal) into the stencil buffer and then only allowing rendering of the entity, if the value ...


0

I figured it out using the following code in pixel shader: float mask = 1.0 - main.a; half4 bg = IN.color; bg.a = mask; half4 color = half4((main.rgb * main.a + bg.rgb * bg.a), main.a + bg.a); return color;


0

The unity standard assets contains a projector game object, material, and shader. Just drag into your scene, reposition, drag material into projector, and drag image into shader “cookie” field.


0

Well, for my bullet hole shader I find the issue to remove the transparent alpha effect by changing my "Blend" with your "Blend OneMinusSrcAlpha SrcAlpha". // Upgrade NOTE: replaced '_Projector' with 'unity_Projector' // Upgrade NOTE: replaced '_ProjectorClip' with 'unity_ProjectorClip' Shader "Projector/Multiply" { Properties { _ShadowTex ("...


2

The issue was not testing that the intersection needs to happen between the object and the light position. i.e I was raytracing past the light. i.e the check: if(t>0.01) should instead be if(t>0.01 && t < length(object_pos - light_pos)) Or in other words, the intersection must happen between the position we are currently testing for ...


1

It is by design. The solution is to clone a material manually and assign to sharedMaterial array. It doesn't affect other materials. The next code will clone only second material, do you note you can't assign a new material directly, you must modify array: Material[] materials = line.sharedMaterials; materials[1] = Instantiate(materials[1]); line....


Top 50 recent answers are included