- Home /
How to render a Cube using Shaders?
Hello!
Ive been searching for awhile on how to render Cube (and/or spheres) using Shaders and havent been able to find barelly anything.
I need them to be rendered with shaders because in my scene it can be possible to have way more then 10k cubes.
So far Ive been using this tutorial to learn how to render points using shaders, which ended to be fairly simple. The thing is that I cant find a way to render cubes using the same idea.
How to use Geometry Shaders to render Cubes and Spheres? Is there any other way to do this?
Erm, everything is rendered using a shader - that's the program that instructs the GPU what to draw to the screen. You mean that you want to construct cube primitives from within CG code? You can do this with a DX11 geometry shader, but I'll be very surprised if it's the solution to your problem. Why do you need 10,000 cubes on screen?
Yes, thats exactly what I want, sorry for my misguiding question.
I need to render a point cloud, which needs to be drawed in several different ways. I already can render it using flat squares, but I also need a 3D visualization of it ins$$anonymous$$d of just a billbord like square, thats why there has got to be so many cubes being drawn at the screen at once and why I need to construct cube primitives within CG code.
Your answer
Follow this Question
Related Questions
Parse error: Syntax Error in compiled shader, Unity 4.3.1 [free] 1 Answer
How to force the compilation of a shader in Unity? 5 Answers
Cg Language incompatibility Desktop VS GLSL Android 0 Answers
Can anyone help me with reflective shader with fall off property? 0 Answers
Sprite deformation in shader? 0 Answers