hlsl

Debugging directx pixel/vertex shaders?

I'm trying to figure out how to debug pixel and vertex shaders in DirectX, I've tried using Pix for Windows but find it to be quite buggy and effectively non-operational. Is there an alternative that would allow me to debug these shaders inside my own application? ...

Vertex shader world transform, why do we use 4 dimensional vectors?

From this site: http://www.toymaker.info/Games/html/vertex%5Fshaders.html We have the following code snippet: // transformations provided by the app, constant Uniform data float4x4 matWorldViewProj: WORLDVIEWPROJECTION; // the format of our vertex data struct VS_OUTPUT { float4 Pos : POSITION; }; // Simple Vertex Shader - carry ou...

HLSL declaring a pass with angle brackets containing values..

In the directx post process sample the downfilter FX has the following code in it: //----------------------------------------------------------------------------- // Technique: PostProcess // Desc: Performs post-processing effect that down-filters. //----------------------------------------------------------------------------- technique...

Silverlight filter/class for cloud generation?

Silverlight filter/class for cloud generation? Some HLSL or just C# class for generating clouds? ...

Can Silverlight play videos with transparency?

Can Silverlight play video with transparency? At least some tricky way for color keying with C# or HLSL? So if you know any way how to please post some info. If yes. What do I need? MSDN if there is any help on this. Open Source Libs/wrappers. Tutorials and blog articles on How to do it. If no: I need know where did you get th...

How to create simple blur filter with HLSL (for Silverlight)?

How to create simple Gaussian Blur filter with HLSL (for Silverlight)? Why - I want to create some complex filter for Silverlight and I do not want to apply blur filter and mine separately. What do I need? I need HLSL filter source. ...

How to do smooth Alpha chanel keying with Silverlight 3 Pixel Shaders?

How to do smooth Alpha channel keying with Silverlight 3 Pixel Shaders? I want some HLSL filter (like this Shazzam HLSL example) sampler2D implicitInputSampler : register(S0); float4 main(float2 uv : TEXCOORD) : COLOR { float4 color = tex2D( implicitInputSampler, uv ); ...

HTML 5 filter language or some analog of filter language?

Is there in HTML 5 filtering language or some analog of filter language? Something like GLSL / HYDRA / HLSL or just JS pixel filter/shader lib? ...

How to create Simple HLSL Silverlight filter for blending/playing with/mixing 2 images?

How to create Simple HLSL Silverlight filter for blending/playing with/mixing 2 images? I need some working example of a filter which would take as an input 2 images\objects and return 1 image - result of some calculations. I want to bring to Silverlight blend modes!) ...

Fetching the vertices from the backbuffer (HLSL) on XNA

Hello and sorry for the obscure title :} I`ll try to explain the best i can. First of all, i am new to HLSL but i understand about the pipeline and stuff that are from the fairy world. What i`m trying to do is use the gpu for general computations (GPGPU). What i don`t know is: how can i read* the vertices (that have been transformed us...

HLSL DirectX9: Is there a getTime() function or similar?

Hi all. I'm currently working on a project using C++ and DirectX9 and I'm looking into creating a light source which varies in colour as time goes on. I know C++ has a timeGetTime() function, but was wondering if anyone knows of a function in HLSL that will allow me to do this? Regards. Mike. ...

Rendering a point light using 6 spot lights?

I'm trying to render 6 spot lights to create a point light for a shadow mapping algorithm. I'm not sure if I'm doing this right, I've more or less followed the instructions here when setting up my view and projection matrices but the end result looks like this: White areas are parts which are covered by one of the 6 shadow maps, the...

DirectX Sphere Texture Coordinates

I have a sphere with per-vertex normals and I'm trying to derive the texture coordinates for the object using the algorithm: U = Asin(Norm.X) / PI + 0.5 V = Asin(Norm.Y) / PI + 0.5 With a polka dot texture, I get: Here's the same object without the texture applied: The issue I'm particuarly looking at (I know there's a few) is t...

Pixel Shader Effect Examples

I've seen a number of pixel-shader effect examples, stuff like swirl on an image. But I'm wondering if anyone knows of any examples or tutorials for more practical uses of shader effects? I'm not saying that a swirl effect doesn't have it's uses, it's just that many of the examples I've found have the basic effect explained and don't g...

Shadow maps unable to properly project shadows in some situations?

In the shadow map sample provided by Microsoft I've noticed an issue where shadows are not properly projected when thin geometry is projected at high angles, see here the shadows being projected, notice the poles from the lights are not projected: http://imgur.com/QwOBa.png And in this screenshot we see things from the lights perspectiv...

Using DirectX headers from Wine to compile under MingW

I have been attempting to build HLSL shader support into VLC player. I have hit a brick wall due to lack of utility methods in d3d9.h in MingW to load a .fx file and compile the shader. So under advise from VLC developers I borrowed the DX9 headers from Wine. Now with the d3dx9.h include enabled I have lots of compiler errors in the for...

Need help with Shallow Water Ripples effect in XNA

hello everyone. I need to create a water-like surface in XNA, viewed from above. Like this : http://www.youtube.com/watch?v=Nr42AG1aPAY Can someone point me to some examples? I don't know where to start. Thanks, SW. ...

HLSL and ID3DXFont/ID3DXSprite

I've started at the beginning, and my code will capably display the grand total of some text. I've been adding support for sprites. The trouble that I've run in to, is that it doesn't seem to recognize my HLSL. I set the technique, began it, began the pass, drew the sprites, flushed them, ended the pass, the technique. And D3D comes up w...

How to create Photoshop Stamp filter analog in any pixel shading language?

How to create Photoshop Stamp filter analog in any pixel shading language? (I need at least filter algorithm...) ...

Packing attributes in a texture, deferred rendering

Hi, I'm rolling a deferred shader pipe, and due to the need to keep the G-buffers in a unified format a need to compress attributes is needed. I've sadly been unable to find some good information on how this actually is done. I have a G-buffer format that uses 16 bits per component in a fixed point format. Sadly as I target shader mode...