Quantcast
Channel: Answers by "keeperkai2"
Browsing latest articles
Browse All 16 View Live

Answer by keeperkai2

If you only want to change the appearances of a few objects in the scene, it's the correct way, but if you want to render the whole scene with a different set of shaders, you should use replacement...

View Article



Answer by keeperkai2

by adding: \#pragma target 3.0 \#pragma debug under the surface function declaration(#pragma surface surf ColoredSpecular) and removing your "MySurfaceOutput" struct declaration and replacing...

View Article

Answer by keeperkai2

According to the reference, Shader.setGlobal functions would only work on variables that are not exposed as a property in the property block. So what you have to do is remove the _test("_test",Float) =...

View Article

Answer by keeperkai2

I'm not sure if this is what you want, but if the texture is the same for all the materials that use the same shader, you can: (i) Remove the texture property in the property block of that shader (But...

View Article

Answer by keeperkai2

Yeah, it seems that is what the docs mean( different meshes with same material, as long as they have less than 900 vertex attributes, they should be batched and rendered in one draw call right?). But I...

View Article


Answer by keeperkai2

I found a way: To be more specific, you can do it in Unity 5 in two ways: The first way, as @helarts says, you simply use the "alpha" option to do this. And the surface shader compiler would add "Blend...

View Article

Answer by keeperkai2

If you want to use Blend SrcAlpha OneMinusSrcAlpha Then you just add alpha or alpha:blend option to the surface shader pragma line If you would like to specify your own way of blending, like you could...

View Article

Answer by keeperkai2

I figured it out, it seems that even for Transparent shaders, you can use the "keepalpha" option and simply specify the alpha like: Blend SrcAlpha One Just like you did in Unity 4(except it would just...

View Article

Browsing latest articles
Browse All 16 View Live




Latest Images