Tag Info

Hot answers tagged

4

Alpha mask texture approach In case your circle would always be the same size, using a second alpha mask texture would be the way to go. You would make it a grayscale mask texture and use its value as the alpha value while drawing. Using a texture had the benefit of having anti-aliasing built into the mask (ie. at the borders of your circle, the pixels can ...


2

In order to do a glow or bloom, you generally need to start with an image, threshold it and possibly colorize it, then blur it and add the blurred version to the original. I would do this by creating a few textures and FBOs for multiple passes. Something like this pseudocode: Create an FBO Attach a texture to it to draw into Draw a textured quad with your ...


2

From the OpenGL wiki: The input_primitive​ type must match the primitive type used with the drawing command that renders with this shader program. Given, Unity is probably using DirectX on Windows, but the same thing should hold true. Because your shader is asking for a point, it is only taking the first point from each primitive and ignoring the rest. ...


2

Treating them like shadows should work fine. -Render the world from the light(s) perspective(s) and record the distance from the light. -Render the world from the camera's point of view, then sample and compare the new distance. -For each pixel, if the world-space pixel-to-light distance is greater than the light-space pixel-to-light distance, the pixel is ...


1

Yes, sending your mesh data to the GL every time you render it would be very wasteful. You should only be doing that if your data has changed from one frame to another (e.g. you are computing animations in the CPU). Otherwise, you shouldn't have to re-submit data if the model/mesh was not changed. Apparently, the problem with your program is that you are ...


1

The individual invocations within a work group will be executed "in parallel". The main purpose of the distinction between work group count and local size is that the different compute shader invocations within a work group can communicate through a set of shared​ variables and special functions. Invocations in different work groups (within the same ...


1

I did something similar, but with edge detection algorithm. I would use the following setup: 2 frame buffers with one texture each. a vertex buffer/mesh with a full screen rectangle (-1,-1 -> 1,1) with the texture cords going from 0,0 to the texture size. one shader computing the game of life The two frame buffers are used alternating, since they can ...


1

It's a problem with sorting order of the objects. Why are both shaders in "Transparent" queue? You could just change the ground shader's queue to "Geometry" and fix the problem. Do you use transparency on the ground objects? If you really need the transparent queue, you could set the queue to things like "Transparent+1" to force it render later than other ...



Only top voted, non community-wiki answers of a minimum length are eligible