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)

3
votes
0answers
423 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
244 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
77 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
234 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
72 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
240 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
293 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
82 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
208 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
841 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
918 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
263 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
336 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
87 views

How to implement efficient Fog of War?

I've asked a question how to implement Fog Of War(FOW) with shaders. Well I've got this working. I use the vertex color to identify the alpha of a single vertex. I guess the most of you know what the ...
1
vote
0answers
38 views

Multi Pass Blend

I am seeking the simplest working example of a two pass HLSL pixel shader. It can do anything really, but the main idea is to perform "ping ponging" to take the output of the first pass and then send ...
1
vote
0answers
22 views

HLSL: An array of textures and sampler states

The shader must switch between multiple textures depending on the Alpha value of the original texture for each pixel. Now this would word fine if I didn't have to worry about SamplerStates. I have ...
1
vote
0answers
58 views

OpenGL - Cascaded shadow mapping - Texture lookup

I'm trying to implement cascaded shadow mapping in my engine, but I'm somewhat stuck at the last step. For testing purposes I've made sure all cascades encompass my entire scene. The result is ...
1
vote
0answers
41 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
68 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
181 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
92 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
46 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
170 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
143 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
85 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
132 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
495 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
1k 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
202 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
169 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
520 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
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
250 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
410 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
282 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
61 views

Gaussian blur not working correctly

So pretty much I tried to add a gaussian blur to something I am making and it is acting oddly. The setup is like: [All framebuffers are cleared to rgba(0,0,0,0), normal blend enabled] Draw some solid ...
0
votes
0answers
16 views

XNA `tex2Dlod` always returns transparent black

I want to sample a texture in a vertex shader, so at first I just tried using float2 texcoords = ...; color = tex2D(texture, texcoords); But apparently I cannot use tex2D in a vertex shader, and ...
0
votes
0answers
12 views

OpenGL textures trigger error 1281 if SFML is not called

I am using SOIL to apply textures to VBOs, without textures i could change the background and display black (default color) vbos easily, but now with textures, openGL is giving an error 1281, the ...
0
votes
0answers
42 views

How to pass a custom array of data to a shader

I want to know how to pass an array of data (it will be an encoded map, actually) to the fragment shader so I can query it as an array. AFAIK this is sadly not implemented in unity, so I'm looking ...
0
votes
0answers
71 views

OpenGL shading doesn't work with different projection and view matrices?

I found an online (public-domain) code to do marching cubes, and I am trying to adapt this code to work in my own project. The code uses GLUT and "older-style" OpenGL, whereas I am using GLM and ...
0
votes
0answers
35 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
28 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
38 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
45 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
66 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
31 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
43 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
54 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 ...