a computer program that runs on graphics hardware and provides a high degree of control over how scenes are rendered

learn more… | top users | synonyms (1)

1
vote
0answers
47 views

Rushing river water [on hold]

I am creating water in unity3d engine, I tried many shaders (flowmap,flow texture,etc) but I am not quite sure how to get the same effect displayed in the following img? http://imgur.com/KduUpaz
0
votes
0answers
41 views

WebGL Multiplayer Game - Direction Needed (Shaders) [on hold]

I've started looking into making a multiplayer game for web browsers. I started with a book "WebGL Up and Running" and it has lead me to be more curious about more detailed aspects of OpenGL. In ...
1
vote
1answer
75 views

OpenGL VBO and VAO Confusion

I would like to present here my Question about VBOs and VAOs. Basically from what i understand you can have different VAOs each of which can contain up to several VBOs , and by binding to the VAO's ID ...
3
votes
1answer
68 views

Geometry Shader not generating geometry for some Vertices

I am playing with a geometry shader and I am wondering why it doesn't generate geometry for each vertex in all meshes? I don't think this is a Cull problem because the same vertices generate ...
1
vote
1answer
59 views

Apply an special effect to an scene area

I have a 2D game where I have a second camera on my scene, that renders an upside down image of the scene, and distorts it, giving the effect of water reflection. I render this camera first, and on ...
2
votes
1answer
133 views

3d compute shaders in order access

I'm working on a compute shader for a 3d texture where I want to evaluate pixels in a specific order, is there any way to do this? let's say that I have made a texture using the following code; tex = ...
2
votes
0answers
43 views

How to generate a RGB * a texture for a glow effect in GLSL?

I would like to create a glow effect in GLSL, there is a tutorial that explains how we multiply RGB * a : I have some questions : is it an operation that is in a fragment shader, where RGBa is ...
1
vote
1answer
54 views

DirectX 11 vertex shader incorrectly sending <0, 0, 0> normal vector to pixel shader

I'm following the Rastertek tutorials. I'm unable to get diffuse lighting working from http://www.rastertek.com/dx11tut06.html. I think the NaNs in the following screenshots is just from stuff ...
0
votes
0answers
13 views

Can i use shaders in allegro without opengl?

I'm currently learning opengl but it seems quite complicated so i considered using some library like sdl or allegro. I noticed that allegro has some built in functions to create and attach shaders. ...
1
vote
0answers
32 views

Generate a large data structure using a compute shader

I know that RWTexture2D Result; void CSMain (uint3 id : SV_DispatchThreadID) { Result[id.xy] = float3(1,2,3); } will result in an texture containing the numbers 1,2,3 however I'm ...
2
votes
1answer
54 views

How to assign texture to shader?

In OpenGL, most shader uniform variables are easy, a float or a vec3 or whatever is associated with a shader program. But samplers are different, we associate a texture unit to the shader program, and ...
1
vote
0answers
24 views

postprocessing shader destroying viewport on linux?

Basically I implemented gamma correction into a q3 based game to get rid of the annoying SetDeviceGammaRamp. On windows and macosx everything works fine, but on linux it draws garbage. It looks like ...
-3
votes
3answers
134 views

Using a basic shader in libGDX

Looking at https://github.com/libgdx/libgdx/wiki/Shaders, I have decided to try these shaders: String vertexShader = "attribute vec4 a_position;\n"+ "uniform mat4 ...
0
votes
0answers
20 views

Textured/Vertex Colored Shader fallback

I have this simple ShaderLab shader that I use for particles, among other things (it's more complicated than this but I have omitted the unnecessary bits). When I do not specify a texture, it falls ...
0
votes
1answer
40 views

Unity shaders: best way of handling data structures

I'm working on a shader in Unity that uses a Binary Tree to store some precomputed values, this binary tree should be available to the shaders and would ideally also be constructed on the graphics ...
1
vote
1answer
43 views

Custom shadowmapping in Unity not working properly

To experiment with a certain technique, I'm implementing my own shadow mapping in Unity. I'm using a camera for the light "view", which is rendered to a RenderTexture after being post-processed with ...
2
votes
1answer
113 views

Why encode floats in RGBA?

Working on some effects that require depth (Z) data in Unity, I saw that these use a method to store the depth data encoded in the RGBA channels of a regular texture. half4 frag(v2f i) : SV_Target { ...
0
votes
0answers
19 views

unity pass texture from one camera to another for shader

I'm working on a system where I have to get a texture from one camera to another (render a -> render b) is there an easy way to do this? For a simplified example this would be used to get the ...
1
vote
1answer
107 views

Apply shader to only a part of a sprite

I'm trying to make an image blur when a transparent image overlays it, I am wanting it only to blur the section that is being overlayed. So if half of the original image is not being overlapped, that ...
0
votes
0answers
38 views

OpenGL Shader Storage Buffer Objects array length problem

Ok guys, I think I have a very strange problem. I have an old laptop, but its HD 6370M currently supports opengl 4.4, so i decided to learn how to use some new features of this platform, so after ...
0
votes
1answer
25 views

Second pass in multipass effect is ignoring

I am trying to render my vertecies in 2 passes, but seems I am doing something wrong, because only one pass applying. I cannot make the second one work despite that second pass is applying. Here is ...
0
votes
1answer
37 views

Wrong distance in Depth-buffer

I am currently trying to get the Depth Buffer as a texture to use it for edge detection algorithms. Since XNA4 does not allow direct access to the Depth Buffer as texture i have to render it into a ...
5
votes
1answer
194 views

unity 5 how to get a shadowmap

I'm writing a custom shader in unity 5 that requires a shadowmap (not just for drawing shadows but also for different computations involving scattering particles through fog). Does anybody know how to ...
0
votes
1answer
54 views

How to use a buffer in GLSL to do a LUT-lookup?

I am currently on a medical application which needs different kinds (up to totally individual) lookup tables (LUT) for image display. And this done with 10bit finish. So it is most of the time ...
0
votes
0answers
13 views

converting HSLS gives error

I'm using the following parser: https://github.com/unknownworlds/hlslparser I also have the following code: /* * Bo Sun, Columbia University, All rights reserved * ...
1
vote
1answer
83 views

Dot based light mask with shader on sprites

So I have a scene, completely based on 2D sprites. I want to render "light sources" into a seperate frame buffer (so mostly dots around, for example, the centre of a flame) and then render that frame ...
-2
votes
1answer
47 views

What's the difference between Rendering pipeline and compute shader?

What's the difference between rendering pipeline - https://msdn.microsoft.com/en-us/library/windows/desktop/ff476882.aspx and compute shader - ...
0
votes
0answers
27 views

Strange result, when changing variable name

I have no idea, what is going on. The mat4 xxx is the cause. Renaming it to "bones"/"bone_transfromations" etc. won't work it gives me an error. Renaming it to "test" works perfectly fine... This is ...
1
vote
2answers
83 views

HLSL Pixel Shader - Color depending on condition

I am new to shaders and HLSL so bare with me on this one. I have a 2D tile map in my game and want to create a mini-map, at first I was just copying all the data from one sprite batch to another and ...
0
votes
0answers
30 views

How to implement data structures for shaders

I'm currently researching computer graphics and esp. how to combine research and it's practical applications. To get started I wanted to implement the methods used by a few papers. First of which I ...
0
votes
0answers
40 views

Good system for experimenting with shaders in different languages

I'm trying to experiment a bit with shaders and they have been programmed in several different languages (GLSL, Cg and HLSL). Now most systems (dirrectX, openGL) have only support for one of them. ...
-3
votes
1answer
69 views

What's the difference between rendering and shaders?

What is rendering? What are shaders like vertex ,tessellation shaders etc? I am confused what's the difference between rendering and shaders? and how rendering is performed using shaders? Can we ...
0
votes
0answers
43 views

opengl shaders getting started problem

I'm following this tutorial for shading in opengl. However I wanted to start with another shader to make things more interesting So this gives me the following code: // Include standard headers ...
0
votes
0answers
13 views

C++ - Error X3501 Main Entrypoint Not Found [duplicate]

I was developing my DirectX 11 app, but when I wanted to add a function to draw a triangle, I get this error from compiler. Error X3501 Main Entrypoint Not Found This is how my main .cpp looks ...
1
vote
1answer
40 views

Pick which directional light shades which object

Suppose you have two directional lights pointing at one sphere from different angles. You would expect the sphere to cast two shadows, but it turns out that this isn't the default behavior. The first ...
0
votes
0answers
108 views

Most efficient way to achieve the following 2D heat wave background effect?

In Unity, what would be the most efficient way to achieve the following heat wave background effect Super Metroid - SNES (skip to 34m 5s for those on mobile) http://youtu.be/yB317FOcU0Y?t=34m5s ...
0
votes
0answers
59 views

DirectX Compute shader (HLSL) makes texture black

Hello this is my first question on this forum :) When using compute shader in directx to change the color to blue the texture only gets black. I really don't understand what the problem could be and I ...
3
votes
1answer
117 views

If-clause in GLSL

I read a few thing about, that in GLSL both sides of the if-clause is executed, so do you have any idea for a workaround for this one: uniform int uses_bones; uniform mat4[] bone_transformations; ...
1
vote
1answer
43 views

OpenGL/GLSL/LWJGL return value from shader

I'm trying to do some bone animation. I don't want the whole skeleton to be loaded to the GLSL shader every time, even tough it's not needed, because one vertex is parented to one bone, not more. My ...
1
vote
2answers
82 views

Curved Meters and Gauges

I'm wondering how people here on GameDev stack exchange would handle curved meter GUI elements for things such as life bars or energy bars. My thought on the matter was that you could use a shader ...
1
vote
1answer
102 views

OpenGL Positional 2D Texture Masking

I have a simple 2D java game engine running using LWJGL. I have my own vertex and fragment shaders, and I'm able to render quads with textures. I want to be able to mask one quad using the texture ...
0
votes
1answer
112 views

Is there a way to start with OpenGL 3.0+ without need to write my own shaders?

I'm starting with OpenGL and found out that after OpenGL 3.x you must write your own shaders (think it's obligatory). Am I right here? I have made some research but I can't seem to find the answer. ...
1
vote
2answers
53 views

How to prevent intepolated texture in fragment shader (Unity CG)

Think about minecraft - all the textures in minecraft have a very nice crisp pixelated look. Well, I'm trying to write a shader that will do this but it appears "sampler2d" returns some sort of ...
2
votes
1answer
110 views

Rendering lighting only on specific objects

I have done something similar to this in monogame: My question is, what would I have to do to draw that lighting effect only on the pillar and not the background ? Is there something like ...
1
vote
1answer
72 views

What is the fastest way of reading an atomic counter?

I have an atomic counter in my fragment shader that my application reads after each drawcall. I am currently using glMapBufferRange with GL_MAP_READ_BIT set. This absolutely destroys my applications ...
0
votes
1answer
55 views

XNA Distortion Shader problem

So I came up with a distortion pixel shader in hlsl, but it has some issues. First of all, here is how it works: The shader uses another texture generated by the program as a distortion "map" (if ...
0
votes
0answers
39 views

Fat geometry shader

I've seen this video: all the geometry seems to grow and become fat. Nice effect. I'm just approaching the shader matter, and I'm still have to learn a lot about how to change geometry via shaders. ...
1
vote
0answers
39 views

OpenGL: Avoid geometry shader for cubemap framebuffer

I want to render an environment map into a cubemap framebuffer but I dislike the fact, that I have to use the geometry shader to set gl_Layer because the geometry shader would be a basic passthrough ...
1
vote
0answers
26 views

SpriteBatch passing textures to GPU

How exactly (or, how often) are textures passed to the GPU shaders in MonoGame/XNA? I am asking because I was profiling a MonoGame/XNA application and noticed that the memory controller load (using ...
0
votes
0answers
12 views

Multisampled Nearest Filtering in PS 2.0 is it possible?

My game involves blocky, pixelated 3D textures. When using nearest neighbor filtering with a texture sampler, I get the desired result of nicely pixelated textures -- with the caveat that hard lines ...