New answers tagged

0

Problem got resolved by changing Phong shading parameters of ambient color, diffuse color, specular color, shininess and alpha. Previously these values were used: // Colors components from 0 to 1 along with their corresponding hexagonal ambient RGB = (0.259, 0.522, 0.957) or #4285F4 diffuse RGB = (0.49, 0.49, 0.49) or #7d7d7d specular RGB = (1, 1, 1) or #...


0

Finally got it right ! Got it by trying to learn more about those matrices. I needed to use the direction vector between particle position and camera as a forward vector Here's the code for those who need it. float3 q = quad[id]; float3 newPos = q * particles[inst].size * _SizeMul; float3 particleDirection = normalize(particles[inst].velocity); float3 ...


1

Well... I kind of figured a way to do it, I think that this isn't optimized at all, but it works flawlessly. In the inspector I added a second material to the object and I created a new shader using the "Is Front Face" and the "Branch" node to set the normal faces transparent and the "back faces" to show the color I wanted


1

Solution 1 Using GrabPass GrabPass is a special pass type - it grabs the contents of the screen where the object is about to be drawn into a texture. This texture can be used in subsequent passes to do advanced image based effects. Just GrabPass { } grabs the current screen contents into a texture. The texture can be accessed in further passes ...


0

There is a coordinate system change between DX and GL since monogame can use either under the hood. This is normally taken care of internally however there are some things that the user must deal with such as passing static or global shader variables. Any thing that monogame cannot know the intended use of, so they fall thru the cracks into the default ...


8

This is not wholly impossible. There's a type of compiler called a transpiler that will take source code written in one language and compile it, not to bytecode or machine instructions, but to equivalent source code in another language. Unity for instance uses this technique to transpile its hlsl-like Shaderlab code to glsl for platforms that don't use ...


0

This fixed it for me: If you use a transparent surface type on standard LWRP or UniversalRP (that does not cast shadows), then change that material to a custom shadergraph's shader, you lose shadow casting. Just use a lit shader for the new pipelines, set it to Opaque, then change it to your custom shader.


Top 50 recent answers are included