The tag has no usage guidance.

25 questions
Filter by
Sorted by
Tagged with
35 views

### What's the intuition behind color burn and other blend modes?

I've implemented a simple color burn function in one of my shaders and I understand the results (I think), but the math behind it, although simple, is unintuitive to me. I struggle to understand how ...
1 vote
47 views

### BlinnPhong sphere edges look worse than Phong. Am I doing it wrong? (code and pictures included)

First of all, I am completely new to this so please excuse me if this is a dumb question. I am following the book Real-Time 3D Rendering with DirectX and HLSL, for now implementing shaders in Nvidia ...
• 11
132 views

### Rendering light balls: Where to do perspective calculations?

After rewatching Bisqwit's starfield renderer video, I've decided to try to rewrite the program in order to learn more about compute shaders and shader programming in general. My knowledge at this ...
• 109
57 views

### Facetted look when using SampleBias

I am writing a simple material system for a game. Each material can have a specular value (phong) that is translated into "smoothness" via environment map. Similar to PBR, I compute a ...
• 171
77 views

### GLSL, Fragment Shader: How to separate functions (like noise, transform...) to reuse in different projects

I'm a total newbie to coding and recently got interested into generative art. This is my problem: I have to copy all of the functions I need (and there are a lot) in every single fragment file I'm ...
406 views

### Is there a tool capable of drawing a triangular linear gradient fill?

I need to draw some shapes filled with linear gradients starting from every point and blending smoothly between points, like an OpenGL standard shading (I guess it is called ...
• 111
1 vote
122 views

### Using original vertices coordinates after clipping

Clipping is down in homogeneous clip space, therefore after multiplying the vertices by the model-view matrix. But as we do clipping in clip space, the position of the new vertices that we interpolate ...
• 269
1 vote
107 views

### Cannot use variable as texture sample value - HLSL DirectX11

I ran into strange problem. My HLSL VS won't compile for given lines: ...
445 views

### Sub pixel rendered white text on black background changes color when resized to a very small size

download: https://upload.wikimedia.org/wikipedia/commons/5/57/Subpixel-rendering-RGB.png The above picture is an example for sub pixel rendering. I tried resizing the image to very small size in ...
1 vote
2k views

### Convert RGB image to YUV420 using a hlsl shader

I am new to shaders and I need to convert efficiently an RGB image to YUV420. I can convert the RGB image to YUV420 with a simple c++ program that uses the ...
• 11
282 views

### How can I implement GIMP's "Colorize" function?

I have an RGB pixel that I'd like to colorize in my program (I'm using GLSL) very similar to how the GIMP "Colors > Colorize" function works. In my program, I can easily convert between RGB and HSV. ...
• 21
6k views

I want to recreate this smoke/cloud effect which is used in the Arrival (2016) movie end credits. I uploaded a sped up version of the credits to see the smoke dynamics. http://streamable.com/n3309 ...
97 views

### Unfolding a 3D point to a Cartesian plane

I am writing a texture splatting pixel shader for meshes (not terrain) whereby I find a UV position from a raycast, which I convert to a local position, and then calculate a bounding box around that ...
733 views

### Tweaking a glow shader to make it look better

I have a simple game and and subjects of it are these little lines. It is targeted for iOS and android so it has a HUGE range of processors that it could run on, right now. I am trying to add ...
• 1,445
872 views

### Can (and how so) shaders paint screen pixels beyond those that occupied by the shaded mesh?

I have some experience programming geometry and compute shaders - but never adventured myself in really playing with the fragment shaders. Currently, I am trying to better understand how they work and ...
• 165
451 views

### Gpu derivatives. How it's done across 2x2 boundary?

This question bothers me since the first time I got to know about derivatives in pixel shader. Suppose we have a 2d texture: 5 10 20 30 6 11 50 100 If I ...
• 711
5k views

### Why do we have graphics frameworks like OpenGL and DirectX, when games could just draw pixels directly?

Games and other graphically intensive applications use frameworks like OpenGL and DirectX. Also they require features like pixel shader and DX12. But why would we need all these frameworks and GPU ...
• 289
233 views

### Trouble Finding Simple 2D DirecX11/HLSL Issue

Some possible things that might be the issue and could be explained by someone who is knowledgeable Order of my indices, In all I've read, your array of indices for a triangle list is just clockwise ...
• 141
958 views

### HLSL Deferred Rendering

I've recently made the switch to Visual 2015 and the .fx files have been depreciated. My project contained .fx files for the shaders so I've been switching over. Only during the switch have I changed ...
• 141
133 views

### Cost of parameter passing in webgl pixel shaders?

In a webgl pixel shader, all functions are inlined as i understand it, however you can have parameters that are marked as in versus being inout meaning that their value can change but the value won't ...
• 7,751
646 views

### Methods for grid traversal in a glsl pixel shader?

I'm working on a shadertoy "snake" game, using the new multi pass rendering abilities to save game state between frames. I'm using raytracing to render the board (an AABB), and am planning on using ...
• 7,751
1k views

### Moires patterns despite using mipmaps

I am working on Silverlight app. I am trying to render floor covered with tiles. Although I am using mip maps I am still getting awful Moire patterns, when trying to render big area. What I am doing ...
442 views

### Texture glitch when using simple pixel shader

I have an issue with rendering my textures in Silverlight. When I look at it from above everything looks fine: But if I only change angle of watching it it looks terrible: I am using very simple ...