a computer program that runs on graphics hardware and provides a high degree of control over how scenes are rendered
16
votes
11answers
3k views
What are some good resources for learning HLSL?
The last time I tried learning HLSL, I made a few shaders and mostly understood what I was doing, but I still felt like I was stumbling in the dark. Most of what I learned I got from various blog ...
13
votes
6answers
2k views
Modern Shader Book?
I'm interested in learning about Shaders: What are they, when/for what would I use them, and how to use them. (Specifically I'm interested in Water and Bloom effects, but I know close to 0 about ...
14
votes
1answer
2k views
The practical cost of swapping effects
I use XNA for my projects and on those forums I sometimes see references to the fact that swapping an effect for a mesh has a relatively high cost, which surprises me as I thought to swap an effect ...
1
vote
1answer
529 views
2d game view camera zoom, rotation & offset using 'Filter' / 'Shader' processing?
I wish to add the ability to zoom-in, zoom-out, rotate and move the view in a top-down view over a collection of points and lines in a large 2d map. I split the map into a grid so I only need to ...
35
votes
1answer
2k views
How can I reduce aliasing in my outline glow effect?
I'm trying to replicate the glowing outline effect in the Left 4 Dead game. The effect causes an objects outline to glow, even when the object is occluded. Here is a screenshot of the effect:
I'm ...
16
votes
4answers
8k views
Using multiple shaders
I'm currently studying opengl shaders but I can't figure out something: how to apply different shaders to the objects, for example, a teapot rendered using toon shader and another one in the same ...
18
votes
3answers
4k views
For voxel rendering, what is more efficient: pre-made VBO or a geometry shader?
Given a fairly static voxel array, what is more efficient: using the CPU to pre-generate a VBO to render the voxel faces (ignoring more advanced forms of rendering like marching cubes for now) or ...
12
votes
2answers
12k views
OpenGL ES 2.0: Setting up 2D Projection
This article describes in general, how to draw sharp OpenGL 2D graphics, using fixed function pipeline.
http://basic4gl.wikispaces.com/2D+Drawing+in+OpenGL
Because OpenGL ES 2.0 has some ES 1.x ...
7
votes
5answers
2k views
What rendering techniques would I use to draw a drop shadow effect for cards in a card game?
What type of shading algorithm might be used to create shadows like these?
the one I'm making is similar but it is all done with a 2D drawing API powered by OpenGL so there is no Z coordinate.
In ...
7
votes
2answers
2k views
GLSL Shader Editors for Linux
Are there any good IDE's for linux that lets us edit GLSL shaders and visualize their effect?
Note : Shader Designer By Typhoon Labs is a good option but I am looking for alternatives as this ...
10
votes
2answers
2k views
Efficient skeletal animation
I am looking at adopting a skeletal animation format (as prompted here) for an RTS game. The individual representation of each model on-screen will be small but there will be lots of them!
In ...
8
votes
4answers
1k views
Fixed-Function vs Shaders: Which for beginner?
I'm currently going to college for computer science. Although I do plan on utilizing an existing engine at some point to create a small game, my aim right now is towards learning the fundamentals: ...
7
votes
4answers
1k views
glsl demo suggestions?
In a lot of places I interviewed recently, I have been asked many a times if I have worked with shaders. Even though, I have read and understand the pipeline, the answer to that question has been no. ...
11
votes
4answers
706 views
Is there any Shaders Directory? [closed]
There are many tutorials to learn GLSL, Cg, HLSL... with classical samples as bump mapping, toon-shading...
But is there a shaders directory?
a website where i can share my shaders
search shader by ...
6
votes
2answers
608 views
Rendering collections of light sources
I have a small test environment where small point lights are scattered. Players should able to collect them.
The collectible lights are rendered using a simple billboard technique where two triangles ...
10
votes
2answers
1k views
Realistic metal shader
How do you create a good metal shader?
For different metals and say more or less eroded / rusty and so on.
I know that one difference from ordinary materials is that metal should 'colour' the ...
9
votes
3answers
866 views
Fastest way to render lines with AA, varying thickness in DirectX
So I'm doing some DirectX development, using SharpDX under .NET to be exact (but DirectX/C++ API solutions are applicable). I'm looking for the fastest way to render lines in an orthogonal projection ...
5
votes
1answer
1k views
How is this glowing with colors radiating outward 2D effect accomplished?
I'm currently totally at a loss as to how this effect is done:
http://www.youtube.com/watch?v=zp8MHUNp7Cg
The glowing on the ship and the changing color. I want to do this effect in XNA 4.0 any ...
4
votes
2answers
821 views
Should the modelview and projection matrices be calculated in the shader or on the CPU?
At minimum I would have a camera with rotation and world position; projections parameters such as angle of view and perspective vs. orthographic; and meshes with scale, angle, and world position.
...
10
votes
2answers
865 views
Projective texture and deferred lighting
In my previous question, I asked whether it is possible to do projective texturing with deferred lighting. Now (more than half a year later) I have a problem with my implementation of the same thing. ...
9
votes
1answer
5k views
How can I create an efficient bloom shader with GLSL?
I have searched the net for resources related to rendering a bloom effect using GLSL, but haven't found anything. Although the tutorial at Philip Rideout's website is a good one, it performs very ...
4
votes
1answer
998 views
Access vertex data stored in VBO in the shader
If I wanted to store extra data in a VBO for skinning (indices for indexing into an array of matrices of bones and floats for applying weights to those bones) How would I go about accessing that data ...
3
votes
1answer
1k views
GLSL if-else statement unexpected behaviour
This question is related to this other one I asked a few days ago. Because I have finally get to the bottom of the issue, I have rather preferred to open a new question with a more detailed ...
4
votes
1answer
982 views
How to invert background pixel's color
I'm writing a game and map editor using Java and jMonkeyEngine. In the map editor, I've got a brush done by wireframed sphere. My problem is: I want to make it visible everywhere, so I want to invert ...
3
votes
1answer
915 views
OpenGL ES Basic Fragment Shader help with transparency
I have just spent my first half hour playing with the shader language.
I have modified the basic program I have which renders the texture, to allow me to colour the texture.
varying vec2 texCoord;
...
2
votes
2answers
819 views
Multiplatform GLSL shader validator?
Im working on a multiplatform (Pc,Mac,Linux) game that uses shaders quite extensively. Since we do not have any funding, it is pretty hard to test our game on all possible hardware configurations.
...
2
votes
2answers
2k views
How do I create a sky box with OpenGL ES 2.0?
Can you give me hint to any good sky box example in OpenGL ES 2.0? I have found only OpenGL and does not work for me.
I am doing it this way:
Initialization:
glUseProgram(m_programSkyBox.Program);
...
1
vote
1answer
125 views
How to mix effects together?
Lets say I have got terrain effect, contains multitexturing, light. Now water effect. It must be different, but must be also affected by light. Other one, player effect, must also be affected by ...
0
votes
2answers
209 views
How can I capture every frame in DirectX 9 using a shader
This is actually a follow up to this question
How to capture the screen in DirectX 9 to a raw bitmap in memory without using D3DXSaveSurfaceToFile
The proponent of the best solution suggested that I ...
-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 ...