Skip to main content

All Questions

Tagged with
1 vote
1 answer
95 views

How do I render a sector (pie/cake slice) of a circular Unity 2D GameObject?

I have a circular GameObject in Unity 2D with a SpriteRenderer attached. I want to attach a custom component to my ...
Robin's user avatar
  • 465
0 votes
1 answer
98 views

How Can I programatically identify a Material in Unity?

I have some gameobjects that in some conditions have an additional material added to them programatically at runtime. I then later want to be able to remove that specific material. How can I identify ...
Michael's user avatar
  • 103
0 votes
1 answer
83 views

Unity shader invalid subscript worldPos

I am trying to write a shader for Unity that replicates Splatoon's painting system, but I cannot get the shader to compile. It has an error on line 41 stating invalid subscript 'worldPos' at line 41 (...
WestMansionHero's user avatar
0 votes
0 answers
35 views

How do I repeatedly change the colors of a list of cubes in run time without causing a bottleneck to my fluid simulation?

I am coding a 3d fluid simulation. I want to render each cell of the simulation grid with a cube, so I have a grid of cubes. Each cube has its own color, and the colors are stored in a compute buffer. ...
Mohamad T Shehab's user avatar
0 votes
0 answers
301 views

Frustum culling using compute shader, how?

I'm working on a little project for a while - creating an area where you can spawn a bunch of grass. I've overcame a major headache when figuring out the GPU instancing for the mesh and the code looks ...
Leedy's user avatar
  • 1
0 votes
0 answers
69 views

How to hide part of character under slope

As shown in the image below I'm trying to find the points in which a line in the world space intersect a sprite. The idea was to get the corresponding values inside a shader to play around with pixel ...
Leggy7's user avatar
  • 1,454
0 votes
1 answer
135 views

Which is better to use C# and Shader to move textures?

We could use C# code Material.SetTextureOffset to move a texture, and ShaderGraph can do the same by Time and ...
Yun CHEN's user avatar
  • 101
0 votes
1 answer
222 views

Custom Unity shader makes mesh look different

I am very much new to custom shaders. My actual problem is that I want to fade a mesh in and out via C# in Unity. However, the materials on the mesh I am using are opaque and setting them to ...
Simon Whitehead's user avatar
0 votes
0 answers
97 views

Increase opacity of a floor plane along the path travelled by a cube

I have a plane object (a normal Unity 3D Plane, but it can be a complex floor in the future) and a cube is moving on the plane. Currently, the plane is transparent. I want to make the plane opaque as ...
Muhammad Faizan Khan's user avatar
0 votes
0 answers
179 views

Problem with drawing on texture

I'm trying to do a simple stretch-card erase effect. Everything works on the PC (both in the editor and in the build). But when I make a build for android, something goes wrong. Pc Version (work vell):...
ArtemiZ Studio's user avatar
0 votes
0 answers
345 views

How to make render texture grayscaled?

I have made a minimap, but I don't know how to make it less colorful and haven't find any solution for this.
imbruceter's user avatar
0 votes
0 answers
136 views

ComputeBuffer Values messed up when calling the dispatch many times in a row

I'm having a RWStructuredBuffer called AffectedVertices give me random data instead of 1 simple value to resultAffectedVertices, ...
TensaDev's user avatar
0 votes
0 answers
67 views

Spawning noise-based fire effect with code, no prefabs

i'm a beginner in Unity, and I'm taking a Graphics course about algorithms of procedural textures/modeling. I would like to write a noise-based fire shader like this one: I would like to then be able ...
SagiGvili's user avatar
0 votes
0 answers
232 views

How to make under-construction sprites have blueprint graphics?

In my game, every placeable object and structure will only be placed as a blueprint, which the characters will then automatically build. An example from "RimWorld": Objects placed as ...
caleidon's user avatar
  • 591
2 votes
0 answers
2k views

Collapse a 3D model to 2d with Shader?

I'm trying to recreate an effect of 3D sprites similar to Ocotpath Traveler (2d sprite similar to billboards/imposters in 3D space, showing 8 sides of the character based on where they're facing), ...
Gregor A. Lamche's user avatar

15 30 50 per page
1
2 3 4 5
8