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)

4
votes
0answers
89 views

Slow uniform array

I'm trying to use an uniform array of matrices in my compute shader. However, it's really slow. I've narrowed it down to this lines of code: uniform mat4 someMatrixArray[64]; ... vec4 result = ...
3
votes
0answers
100 views

PCF shadow shader math causing artifacts

For a while now I used PCSS for my shadow technique of choice until I discovered a type of percentage closer filtering. This method creates really smooth shadows and with hopes of improving ...
3
votes
0answers
405 views

How to reproduce the 3ds Max Gradient Ramp effect?

The material definition of a mesh is composed of these three components: Self-Illumunation, Refletcion and Refraction. Each of these components has a Gradient Ramp as a map and the mapping mode is set ...
2
votes
0answers
229 views

Ashikhmin-Shirley model implementation: ugly result

I am trying to implement the Ashikhmin-Shirley model using these formulas: This is the GLSL 1.2 fragment shader code: uniform vec4 materialAmbient, materialDiffuse, materialSpecular; uniform ...
2
votes
0answers
74 views

Framebuffer Heightmap Performance Problems

I am using a framebuffer to procedurally create heightmaps with perlin noise in GLSL shaders. There are two main problems that I am experiencing with this. I have a quadtree for the terrain and in the ...
2
votes
0answers
220 views

Monogame working with Krypton

I am trying to make a simple 2D game engine using Monogame and the Krypton 2.0 lighting engine. So far I have succeeded in rendering a light but I am unable to generate any shadows from any hull's. ...
2
votes
0answers
69 views

Transparency behaviour on PowerVR

I'm doing some graphics optimizing tests, especially on PowerVR transparency. Now I made a scene where there are two groups of simple objects. One group has the shape in geometry using diffuse shader ...
2
votes
0answers
223 views

How to create heat haze effect in Libgdx?

I would like to create a heat haze effect for a 2D game I am making. Do You have ideas or suggestions, how to get that effect. I am using Libgdx(OpenGL 2.0). Thank You in advance!
2
votes
0answers
285 views

XNA 4.0 Pixel Shader 3.0 Exact Texture Lookup/Sample Issue

I am stuck on trying to solve this problem. I originally had some shaders written that worked for XNA 3.1, but after converting to XNA 4.0 they would no longer compile due to instruction counts, flow ...
2
votes
0answers
79 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 ...
2
votes
0answers
202 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. ...
2
votes
0answers
803 views

2D water shader in SFML

I want to implement the algorithm for a 2D water surface described here and here. Before somebody finds out, beats me up and deletes this, I'm gonna say it myself. I posted this question over at ...
2
votes
0answers
884 views

VS2012 C++: Unable to ID3D11Device::CreateVertexShader when loading compiled CSO file

I have been trying to get a tutorial Direct X 11 application running for some time now. I'm being stymied when I try to create the vertex shader. Setting the Direct X Debug setting reveals that I am ...
2
votes
0answers
257 views

Kinect User Silhouette Shader

I have this usermap from kinect's depth data (size is 320x280) and i want to display it on my game. The problem, of course it's ugly (first image) and i want to have beautiful effect like in the ...
2
votes
0answers
332 views

Normal maps in 3dsMax - OgreMax - how to view associated tangent vectors?

Reading this post I found out that 3dsMax might not use the same tangents when rendering normal mapped objects. In my case, I was using Ogre and OgreMax to analyze results and they were very ...
1
vote
0answers
38 views

Compute min/max position of tile in compute shader

I'm trying to implement tiled deferred lighting with OpenGL compute shaders. For that, I need to compute the minimum and maximum position of each tile. My first approach was to use atomicCounters ...
1
vote
0answers
51 views

Global variables with fixed shaders

In Unity3D, can I use global shader uniform variables with fixed function shaders?
1
vote
0answers
63 views

SpotLight in ForwardBase pass using forward rendering

Is there anyway I can force Unity to allow me using a custom shader to render spotlights in a ForwardBase pass (using Forward Rendering Path)? For what I could see since now: Unity use and ...
1
vote
0answers
137 views

How can I combine my scrolling effect with the vertex lit shader?

I want my shader to work in both Forward and VertexLit rendering modes. I'd written a texture scrolling shader, but I also want to consider lighting which is produced by Vertex lit shader. I can't add ...
1
vote
0answers
216 views

Normal mapping does not work correctly using GLSL and OpenGL

Hello I wrote a simple OpenGl program using GLSL to render a simple uv mapped plane using the normal mapping technics. Here's the display with a simple phong shading (without normal mapping) : Now ...
1
vote
0answers
191 views

Shadow mapping implementation not working?

I am trying to implement Shadow Mapping in my program using Java/LWJGL/OpenGL/GLSL, but I cannot get it to work properly. Let's start off with a screenshot first, then the relevant code and lastly ...
1
vote
0answers
90 views

Can't understand the Schlick model formula

I'm trying to implement the Schlick shading model in the fragment shader. I took the formulas from Karsten Schwenk's "a survey of shading models for real-time rendering": First of all I don't ...
1
vote
0answers
45 views

Approximating Subdivision Surfaces with Gregory Patches for Hardware Tessellation

I'm trying to implement the approach (http://research.microsoft.com/en-us/um/people/cloop/sga09.pdf). Unfortunately I'm not quite clear regarding the formulas in chapter 3, I am hoping to get some ...
1
vote
0answers
158 views

GLSL, Internal error: assembly compile error for fragment shader at offset 513

My vertex and fragment shaders link correctly. When I try and link my shader program I get the error: "Internal error: assembly compile error for fragment shader at offset 513". Pastebin of fragment ...
1
vote
0answers
130 views

Cylinder scrolling / wrap-around world using shaders?

I am making a 2D game using OpenGL ES 2.0 (libgdx), where the world will wrap-around itself on Y-axis. Apart from implementing the "modulo" method in my rendering code, I'm wondering whether it's ...
1
vote
0answers
84 views

How do I align textures properly with an exploding sprite / breakable body?

I'm working on a game based on Box2D and Starling which includes breakable bodies - bodies/objects that when hit with sufficient force break apart (into smaller pieces). I've managed the physics part ...
1
vote
0answers
129 views

Matrix array doesn't seem to get populated

I'm trying to stream an array of matrices to a vertex shader, but it seems that only the first matrix works. What could be the problem? I suspect that I upload the matrices in a wrong way. C# ...
1
vote
0answers
456 views

TEXCOORD0 vs COLOR in a Cg shader

I started to learn Cg shader programming, following the Panda3d shader tutorials. Having a scene with only a cube shown, each vertex of the model with a different color, I can successfully use the ...
1
vote
0answers
952 views

Multiple Render Targets, Multiple Fragment Shaders

I render a normal and a depth image of a scene. Then I want to reuse these two images to do further texture/image processing in a second fragment shader. I use a framebuffer with 3 textures attached ...
1
vote
0answers
200 views

Vertex shader to Pixel shader NVIDIA problem - restarting drivers

I have problem with my shader on NVIDIA cards. On AMD it's working right. Shader Builder exported CODE: //ROOT //PSParts //VSParts //Samplers sampler sLod23ColorGround : register(s0); sampler ...
1
vote
0answers
165 views

loading a heightmap as texture in shader

I have a height map of 256x256, containing, foreach cell, not only height as a normal float value ( not 0-1 ) and also 2 gradient values ( for X and Y ), also as normal float values ( not 0-1 ). I ...
1
vote
0answers
502 views

Need help transforming DirectX 9 skybox hlsl shader to DirectX 11

I am in the middle of implementing a skybox to my game. I have been following this tutorial http://rbwhitaker.wikidot.com/skyboxes-2. I am using MonoGame as a framework and in order to support both ...
1
vote
0answers
1k views

ssao implementation

I try to implement a ssao based on this tutorial: link I use a deferred rendering and world coordinates for shading calculations. When saving gbuffer a vertex shader output looks like this: ...
1
vote
0answers
232 views

Outline Shader Effect for Orthogonal Geometry in XNA

I just recently started learning the art of shading, but I can't give an outline width to 2D, concave geometry when restrained to a single vertex/pixel shader technique (thanks to XNA). the shape I ...
1
vote
0answers
249 views

Full screen shader causes performance hit

I basically want to have a shader run that can do something like toon shading, or grayscale the whole screen, or radial lighting. To do this, I create a new bitmap each time the display resizes that ...
1
vote
0answers
398 views

Unity surf shader not rendering

I have created a default surface shader in unity and added a texture but it is not rendering. If i switch to a diffuse shader i see the texture but my shader is just black. Shader "TestShader" { ...
1
vote
0answers
281 views

Why does drawing bounding boxes disable my other shaders?

I have some .X models loaded via self-written AssetManager that has Lists with models in it. I also apply a diffuse shader to my models. All the models are "self-drawing" in a BasicModel class. ...
0
votes
0answers
27 views

Barycentric vertex coordinates in GLES 2.0

I have a certain set of polygons, which are stored in a vertex buffer and an index buffer. The polygons are textureless and normalless. The polygons are dynamic, their buffers get constantly emptied ...
0
votes
0answers
26 views

Using a Quad to cut out a Layer?

Looking for options on this, but I wanted to take a Quad (or other shape), apply a material to it, and have it cutout an entire layer, to reveal the layers below/behind it. Sort of like a portal ...
0
votes
0answers
45 views

Chroma Keying Shader

I want to apply chroma keying shader for my application. For this I used GPUImage plugin. In that I found GPUImageChromaKeyingBlendFilter class to satisfy my needs. In plugin, ...
0
votes
0answers
33 views

Experiencing weird effects with framebuffer

So I am trying to build a working flashlight in my game. I am using libgdx and the framebuffer class but there are some weird effects that I am experiencing and that may be due to my lack of ...
0
votes
0answers
34 views

Transform texture coordinates when using shader

Assuming I define four vertices of a quad with texture coordinates that cover a whole texture or region of a texture, I can animate these coordinates by setting a transform using SetTransform( ...
0
votes
0answers
37 views

How to add a flashlight in libgdx?

So I want to add a flashlight to the game when the game starts to get darker which I already have working. I bound a light texture to the batch and the first problem is that for some reason the ...
0
votes
0answers
43 views

MonoGame: Can't compile effect

I'm having trouble compiling a very simple pixel shader using the content pipeline in MonoGame 3.2. Whenever I compile the shader using "ps_3_0" it works but when I try to load it using the ...
0
votes
0answers
24 views

DirectX9 Normal/Bump Mapping Weird Texturing Artifact

As you can see the artifact here is like a triangle of the mesh getting more light. The important part of my code is below. This is the vertex declaration. VertexElement[0].Stream = 0; ...
0
votes
0answers
41 views

XNA Shader deformation event driven

I’m working on this tutorial trying to figure out how i can modify the code in order to get the deformation along only one axis (for example Z axis) when I hit a button on my keybord. In other words, ...
0
votes
0answers
42 views

Why distance field text rendering have clear outline?

http://www.valvesoftware.com/publications/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf All the process for doing distance rendering is clear, but 'how does it work' is not clear for me. It looks ...
0
votes
0answers
24 views

opengl output to texture with 4 levels of depth

i'm building a game where transparency is important. I can live with being restricted to four levels of depth and my current plan is to do two passes: 1. render everything to a texture using ...
0
votes
0answers
57 views

Diffuse Mapping in a Game

I want to figure out the diffuse maps of some rusted objects that I plan to render in my game arena. I have taken the images of some sample objects and have also scanned them for a model of the ...
0
votes
0answers
56 views

Bilinear filter in repeating texture, HLSL

I have a repeating texture that I'm using as a scroll surface. The idea is that as I pan the surface I adjust the texture coordinates, filling in what gets wrapped on the right as it disappears from ...