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...
View Article3D 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 by...
View ArticleHow do I implement 2D shadows cast between layers?
How could I implement 2d shadows that are cast by objects in a different layer? NOT like the dynamic lighting in the well known tutorial from Catalin Zima : But like the shadows of the pipes in this...
View ArticleDefining lines from a heightmap
To a pixel shader of a 2D game, I’m passing a 1-row heightmap that holds the height in UV coordinates of evenly distributed points throughout the texture I’m drawing, but as for n points there will...
View ArticleWeird rendering issue when applying lightmap through HLSL
I have a weird issue when trying to render the lightmaps in my game. Please see the following screenshots. Note how the scene looks up close with the lightmaps enabled. Note how that same part of the...
View ArticlePer-fragment lighting system behaves like ambient lighting system
This is the relevant section of my fragment shader varying vec3 normal; varying vec3 halfv; ... vec4 color = ambient * gl_LightSource[0].ambient; vec3 n = normalize(normal); float nl = max(dot(n,...
View Articleusing heightmap to simulate 3d in an isometric 2d game
I saw a video of an 2.5d engine that used heightmaps to do zbuffering. Is this hard to do? I have more or less no idea of Opengl(lwjgl) and that stuff. I could imagine, that you compare each pixel and...
View ArticleColor grading, shaders and 3d textures
I’m trying to implement color correction with the 3d lookup table. The lookup table is actually just a 2d texture 256×16 and consists of 16 squares which one is 16×16. When it comes to rendering, I...
View ArticleComputing pixel's screen position in a vertex shader: right or wrong?
I am building a deferred rendering engine and I have a question. The article I took the sample code from suggested computing screen position of the pixel as follows: VertexShaderFunction() { ......
View ArticleHow can I find a position between 4 vertices in a fragment shader?
I’m creating a shader with SharpDX (DirectX11 in C#) that takes a segment (2 points) from the output of a Vertex Shader and then passes them to a Geometry Shader, which converts this line into a...
View Article
More Pages to Explore .....