Categories
Game Creation Mastering Development

Unity: GPU Instancing with different textures?

I’m making use of Unity‘s GPU Instancing in my 2D game and it really reduces draw calls significantly when using the same Material and same sprite (texture) on all batched gameObjects. I’m changing colors using MaterialPropertyBlock and everything works fine. But is there a way to do that with different sprites (textures) on batched gameObjects’ […]

Categories
Game Creation Mastering Development

Unity Grid Shader line Color

First of all I’m sorry if my question is a odd thing to ask, but i’m new to Shader things and don’t know how to handle this stuffs. I have a shader that draws grid on a ground plane and it works just fine. But i wanna do one thing more. Currently the color of […]

Categories
Game Creation Mastering Development

Unity Grid Shader line Color

First of all I’m sorry if my question is a odd thing to ask, but i’m new to Shader things and don’t know how to handle this stuffs. I have a shader that draws grid on a ground plane and it works just fine. But i wanna do one thing more. Currently the color of […]

Categories
Game Creation Mastering Development

Unity Grid Shader line Color

First of all I’m sorry if my question is a odd thing to ask, but i’m new to Shader things and don’t know how to handle this stuffs. I have a shader that draws grid on a ground plane and it works just fine. But i wanna do one thing more. Currently the color of […]

Categories
Game Creation Mastering Development

Unity Grid Shader line Color

First of all I’m sorry if my question is a odd thing to ask, but i’m new to Shader things and don’t know how to handle this stuffs. I have a shader that draws grid on a ground plane and it works just fine. But i wanna do one thing more. Currently the color of […]

Categories
Game Creation Mastering Development

Unity Grid Shader line Color

First of all I’m sorry if my question is a odd thing to ask, but i’m new to Shader things and don’t know how to handle this stuffs. I have a shader that draws grid on a ground plane and it works just fine. But i wanna do one thing more. Currently the color of […]

Categories
Game Creation Mastering Development

Generated Mesh Does Not Have Shadows/Shading

Description I’m trying to create a water shader, and at this point in development I’m using a Photoshop-generated cloud texture as a map for vertex displacement. The displacement itself works just fine, but there is no shading on the mesh. In Game view: In Scene view: Without the Point Light, the whole mesh is just […]

Categories
Game Creation Mastering Development

Trying to use an overlapping shader for 2D sprites but sprite wont show its shape

So Im trying to use this shader I had from a while ago to implement shadows in a 2D top down game. Sprites dont overlap which is good, but the shape of the sprite is completely different, as the sprites in the sprite renderer are circles not squares. And it seems to cover any other […]

Categories
Game Creation Mastering Development

How to make a brightness-inverting shader?

I have a stone texture that looks great, except for one thing: it’s very dark and I want white stone. I don’t want to mess with the texture, because it’s used for other things in the same project. What I’d like to do is invert the brightness in a shader. Specifically, I want a custom […]

Categories
Development Game Creation

Is there a way to get a shader circle on terrain points positions?

Using this I can draw a circle shader over the terrain : Shader “Custom/TerrainCircle” { Properties { _MainTex(“Texture”, 2D) = “white” {} _MainColor(“Main Color”, Color) = (0, 1, 0) _CircleColor(“Circle Color”, Color) = (1, 0, 0) _Center(“Center”, Vector) = (0,0,0,0) _Radius(“Radius”, Range(0, 100)) = 10 _Thickness(“Thickness”, Range(0, 100)) = 5 } SubShader { CGPROGRAM #pragma […]