Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [pixel-shader]

The tag has no usage guidance.

1
vote
1answer
50 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 ...
3
votes
1answer
102 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. ...
7
votes
2answers
2k views

Advice on how to create GLSL 2D soft smoke/cloud shader

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 ...
4
votes
0answers
87 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 ...
9
votes
1answer
418 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 ...
9
votes
2answers
493 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 ...
5
votes
1answer
244 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 ...
16
votes
3answers
4k 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 ...
1
vote
3answers
192 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 ...
6
votes
1answer
694 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 ...
8
votes
1answer
78 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 ...
5
votes
1answer
393 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
votes
2answers
347 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 ...
5
votes
1answer
335 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 ...
7
votes
3answers
299 views

Changing image so it would look like through colorful glasses

I am currently working on some simple pixel shader in HLSL. I send to shader texture and I want to make it more colorful (something like in the picture below). In the picture 1 there is original ...
31
votes
3answers
10k views

When is a compute shader more efficient than a pixel shader for image filtering?

Image filtering operations such as blurs, SSAO, bloom and so forth are usually done using pixel shaders and "gather" operations, where each pixel shader invocation issues a number of texture fetches ...