a computer program that runs on graphics hardware and provides a high degree of control over how scenes are rendered
2
votes
2answers
68 views
3D Distortion Effect
I'm trying to make a distortion effect similar to this:
However I'm not making a 2d screen space effect. I'm applying it to a 3d scene and I want it to be placed IN the world, so it can be blocked ...
0
votes
0answers
28 views
Unity - Help Shader texture coordinate
I am making a 2D water shader. For this, I use GrabPass which works well. But I am facing an issue.
If I want to display the GrabPass texture I have to create my own texture coordinates because ...
2
votes
0answers
52 views
OpenGL Calculate Matrices
Im trying to switch from the glTranslate etc to my own Matrices, but for some reason it does not work. Here are my 2 functions to create the view- and projection matrix:
public Matrix4f ...
0
votes
1answer
44 views
Get world-position in Vertex shader
I'm wondering how I can get the final position of a vertex. I use glTranslate in my render code, and I'm not getting the world-coordinates correct. My world is devided in chunks and my position get's ...
0
votes
1answer
65 views
GLSL Shaders-> How to manage?
As your game get's bigger and bigger, you will use more and more different shader effects.
Let's take an easy example:
I have clouds in my voxel-based world, and I want to give it a blue-ish tint ...
1
vote
1answer
131 views
GL_EXT_shadow_samplers killing my shader
I have the following fragment shader for my scene
#extension GL_EXT_shadow_samplers : require
...
vec4 color = texture2D(uTextureUnit0, varTexCoord0);
if (colorTransformEnabled != 0) {
vec3 ...
0
votes
0answers
41 views
DX11 Tessellation LOD with diameter incorrect tessellation values [closed]
I implemented the LoD with diameter from following withpaper NVidia TerrainTessellation WhitePaper. In Chapter "Hull Shader:Tessellation LOD" Page 7 there is a very good explenantion of the LoD with ...
0
votes
1answer
39 views
Shader registers for different graphics card
The title is not very explicative, so i'll try to make myself clear.
I have two "working"(on which i work on) PCs : a desktop that runs an NVIDIA GT440 an a laptop with a RADEON HD 4650. I have a ...
3
votes
1answer
225 views
Does Unity's “Transparent Bumped Specular” translate to “semi-shiny must be semi-transparent”?
Unity's documentation for the "Transparent Bumped Specular" shader/material-type is simply a concatenation of each of the descriptions for its Transparent and Specular Shaders (and also Bumped, but ...
1
vote
2answers
75 views
In the Direct3D 9 Effect API, how do you find the texture variable linked to a sampler?
In Direct3D 9 effect files you can write a sampler state that specifies a texture variable to use, like
Texture2D g_texSkyDome;
SamplerState g_samplerSkyDome
{
Texture = <g_texSkyDome>;
...
4
votes
0answers
181 views
Optimizing performance of a heavy fragment shader
I need help optimizing the following set of shaders:
Vertex:
precision mediump float;
uniform vec2 rubyTextureSize;
attribute vec4 vPosition;
attribute vec2 a_TexCoordinate;
varying vec2 tc;
...
0
votes
0answers
43 views
Unity Shader GrabPass alternative
Is there an alternative for the heavy GrabPass method ?
Is there a solution to avoid the foreground issue ? I mean when using GrabPass, if the refracted object is in front of the bumpy refractor, he ...
3
votes
1answer
75 views
What is a Fragment Pipe?
I remember someone saying "24 fragment pipes on nVidia 7800" in a presentation.
Am I correct in saying that a fragment is the data that can generate a pixel in the frame buffer? Or are fragments the ...
3
votes
2answers
263 views
2D water shader similar to Limbo's effect
I'm wondering how I would go about creating a 2D water shader that is seen in this video http://www.youtube.com/watch?v=phChFfi4GOs
The water effect that limbo uses is pretty awesome. I'm not so ...
0
votes
2answers
188 views
2D Water Shader
I am trying to build a 2D Water shader and I am using Unity but the plateform isn't a problem.
Here is an example of what I am trying to reproduce :
Limbo water shader
Are there any good tutorial or ...
2
votes
1answer
543 views
Blur shader without render textures?
Is it possible to append a blur shader to a standard (diffuse) shader ? I am looking for a way to do this as Unity indie doesn't allow render textures.
0
votes
0answers
81 views
How can I fix dark banding artifacts when I turn on SSAO? [closed]
When enabling SSAO on my object ( in grey on the picture, background in green), sometimes, claimed in position of the camera, dark bands appear on my object (see picture).
The shader is written in ...
-1
votes
1answer
25 views
Shader applied to Texture is not showed in GLSLES
I'm trying to learn the basic of shaders following basic tutorials in Ogre.
I use GLSL ES 2.0 #version 100
I think I have a basic concept problem. I'm trying to render a model + texture without make ...
1
vote
1answer
402 views
how to modify shadow mapping in “3D Graphics with XNA Game Studio 4.0”?
So I've been following the tutorials from the book Sean James's "3D Graphics with XNA Game Studio 4.0", and have been doing fine until i reached the shadow mapping part.
in this book it creates point ...
2
votes
2answers
583 views
Multiple render targets and gamma correctness in Direct3D9
Let's say in a deferred renderer when building your G-Buffer you're going to render texture color, normals, depth and whatever else to your multiple render targets at once.
Now if you want to have a ...
3
votes
0answers
55 views
Multipass shaders and switching between passes
As mentioned here Effects should be avoided in DX11. If I understand correctly, that includes techniques and passes defined in *.FX files. So when doing a multipass shader (like the always-mentioned ...
0
votes
0answers
49 views
NVIDIA FX Composer 2.5 not updating time in preview
I started testing shaders today and got a problem with
FX Composer.
When I download Shaders from the Shader Library it compiles them fine and
I get a preview which applies the material to the object, ...
1
vote
1answer
84 views
Texture Shaders vs. Pixel/Fragment Shaders?
My question is a simple one.
Functionally, practically, and performance-wise, what are the differences between using a D3DX Texture Shader, and using a Pixel/Fragment Shader rendered with a full ...
-2
votes
1answer
56 views
Does it matter where I initialize Directx11's shader constant buffer?
Should I initialize it before Map(), before Unmap() does it make no difference?
-1
votes
0answers
59 views
XNA/HLSL cone shape 2D light
I'm new to HLSL and I'm trying to create a simple light for my 2D game. I made a point light and it looks great. However now I'm trying to create a cone shape light but I just don't know how. can ...
1
vote
2answers
99 views
State propagation in modern OpenGL
When last I dabbled in game development, I managed my geometry in a tree. Every node would call the render method on it's children, prior to resetting it's transformations, thus allowing the ...
3
votes
1answer
89 views
Do I need Texture Units when NOT using shaders?
Does calling glActiveTexture() even make sense when not using shaders?
I only have to switch the textures before drawing a buffer with glBindTexture(), right?
1
vote
1answer
49 views
I have a frag shader, one with an empty s_lightMap, how and why is it effecting the output?
I have an image of concrete rocks of different shades of colors, and I'm applying this shader, but without referencing s_lightMap's uniform in my program:
precision mediump float; ...
1
vote
1answer
113 views
Driver error when using multiple shaders
I'm using 3 different shaders:
a tessellation shader to use the tessellation feature of DirectX11 :)
a regular shader to show how it would look without tessellation
and a text shader to display ...
2
votes
1answer
150 views
Using Ogre particle point billboards with shaders
I'm learning about using Ogre particles and had some questions about how the point type particles work.
Q. I believe point type particles are implemented as a single position. Is one single vertex is ...
3
votes
2answers
97 views
Screen effects and antialiasing
I have been working on a game for a while using glut for basic window creation.
I was rendering to an offscreen buffer so that I could implement various effects like screen bulging, motion blur, ...
4
votes
1answer
147 views
How can I use shaders to make a square have a waving effect?
I'm new to using shaders to do some fancy effects and I'm struggling with them. I'm using DirectX 11 and HLSL. I have this square in the middle of the screen:
It's just a square that I've created ...
5
votes
1answer
2k views
gl_PointCoord always zero
I am trying to draw point sprites in OpenGL with a shader but gl_PointCoord is always zero.
Here is my code
Setup:
//Shader creation..(includes glBindAttribLocation(program, ATTRIB_P, "p");)
...
2
votes
0answers
45 views
OpenGL ES Single Bitplane Texture (or something close)
I'm looking to use a texture to store single bits (or a low number of bits, two or three). This in of itself isn't hard if you're using nearest neighbor sampling with some bit plane unpacking. The ...
0
votes
1answer
54 views
Are there shaders or at least shader like things in Swing?
Is there? Because I'm wondering if it supports GLSL, HLSL, or it's own shading language? I don't know much about Swing graphics. Does anyone know?
1
vote
1answer
88 views
“lerp” returning value (Shader)?
I don't understand the lerp example in this code :
if(dot(WorldNormalVector(IN, o.Normal), _SnowDirection.xyz)>=lerp(1,-1,_Snow))
o.Albedo = _SnowColor.rgb;
else
...
3
votes
1answer
131 views
variable number of lights in a glsl shader?
I want to render an arbitrary number of lights in my fragment shader. I do not understand how you can properly pass them into the shader though. For example, I want something like this:
uniform int ...
3
votes
2answers
185 views
Techniques for reducing terrain shader complexity
My terrain shader does quite a bit, but I don't know how to break it up in any way that will reduce my instruction count without removing key features of the terrain. It does the following:
...
3
votes
1answer
96 views
Multiple Textures in Shader?
I have this (pseudo) code:
unsigned int TextureLoc = glGetUniformLocation(programID, "objectTexture");
for(int i = 0; i < object->texturesCount; i++)
{
glActivateTexture(GL_TEXTURE0);
...
0
votes
1answer
156 views
How to do Triplanar Texturing
Ok maybe i'm missing something because its getting late and i've been programming now for about 72 hours straight (minus a nap or 2) ...
I'm trying to write a shader for unity that will apply ...
3
votes
2answers
139 views
Shaders and Performance
I'm coding my first Shader in my little game engine, and I have some questions about it's performance and common approaches.
Is the Shader code processed by the video card instead of the PC ...
9
votes
3answers
878 views
Pixel-perfect rendering to a rendertarget with a fullscreen quad
I have some trouble rendering a bunch of values to a rendertarget. The values never end up in the exact range I want them to. Basically I use a fullscreen quad and a pixel shader to render to my ...
-2
votes
1answer
67 views
Incorrect rotations using openGL GLM and shaders [closed]
The goal of my program is to display a simple colored triangle rotating on the Y axis without any translation. I'm using the GLM library. The problem is that the transformations of my triangle are not ...
3
votes
0answers
100 views
Combining Effects
To be able to work efficiently with effects, isn't there a "good" way to combine multiple effects so that one effect handles stuff like "Multi texturing" and another controls the value like Ambient ...
1
vote
2answers
138 views
HLSL Multitexturing with more than 4 textures
I've come up with an idea that should work in multitexturing a terrain with more than 4 textures, up to a 64 if a supported ShaderModel is used.
I'm trying to use the RGBA color values as both values ...
1
vote
0answers
69 views
iPhone GLSL shader dynamic branching issue
I am trying to pass an array of vec3 as uniform and then iterate through them on each pixel. The size of array varies on situations so I can't make the loop with constant number of iterations. ...
4
votes
1answer
254 views
GLSL Editor and Debugger for MacOSX with ES2 support
is there a GLSL editor for the mac? I need it for iOS OpenGLES2 shader.
How do you best debug shader?
Regards
2
votes
1answer
123 views
Pixel Shader gradient problems
I have pretty much zero experience working with shaders as my first couple phone games were just 2d games that didn't use any sort of shaders. Now I'm working on a PC game that has a day and night ...
-1
votes
3answers
107 views
Directional light and matrix issues
I'm trying to implement basic directional lightning in OpenGL 3.3 by emulating the logic shown in this guide: http://www.arcsynthesis.org/gltut/Illumination/Tutorial%2009.html
I do not understand ...
0
votes
1answer
98 views
How to get a smooth dimming with SSAO?
I implemented SSAO in my game based on the tutorial at gamerendering.com. But the results I get are disappointing. Instead of a smooth effect as seen in the nvidia demos, my implementation causes ...

