pixel-shader

How can I obtain a sketch or hand-drawn look in Silverlight for various controls?

I am looking to create a Silverlight application that employs a control style similar to what one might see when using Balsamiq Mockups or SketchFlow. I am not sure how this look is best achieved in Silverlight. My initial thought is that clever use of a pixel shader effect on the desired control might just do the trick, however, my ...

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...

Handling alpha channel in WPF pixel shader effect

Is there something unusual about how the alpha component is handled in a pixel shader? I have a WPF application for which my artist is giving me grayscale images to use as backgrounds, and the application colorizes those images according to the current state. So I wrote a pixel shader (using the WPF Pixel Shader Effects Library infrast...

Is there any kind of HLSL or HYDRA Pixel Shader languages for JAVA?

Is there any kind of HLSL or HYDRA Pixel Shader languages vorking in toch with for JAVA? So I have an image. I want to use some Pixel Shader language to modify it as I do in Flash with HYDRA or HLSL with C# (in bouth cases I have precompiled shader). So how to use HYDRA or HLSL or any thing else for developing CROSSPLATFORM (win mac lin...

Block filters using fragment shaders

I was following this tutorial using Apple's OpenGL Shader Builder (tool similar to Nvidia's fx composer, but simpler). I could easily apply the filters, but I don't understand if they worked correct (and if so how can I improve the output). For example the blur filter: OpenGL itself does some image processing on the textures, so if they...

HLSL How can one pass data between shaders / read existing colour value?

Hello all, I have 2 HLSL ps2.0 shaders. Simplified, they are: Shader 1 Reads texture Outputs colour value based on this texture Shader 2 Problem: Need to read in the colour from Shader 1 Outputs the final colour which is a function of the input colour (They need to be different shaders as I've reached the maximum vertex-shader ...

How do you access a previously shaded texture in a Pixel Shader?

In WPF, I want to use a pixel shader to modify a composite image i.e. a new image overlaid on top of a previously shaded image. The new image comes in as a largely transparent image except where there is data (think mathematical functions - sine wave, etc). Anyway this process needs to repeat pretty rapidly - compose the currently shad...

Efficient pixel shader sum of all pixels

How can I efficiently calculate the sum of all pixels in an image, by using a HSLS pixel shader? I'm interested in Pixel Shader 2.0, that I could invoke as a WPF shader effect. ...

How could I implement a bleach bypass shader effect for WPF?

How could I implement a bleach bypass shader effect for WPF? I'm also interested in the possibility of implementing the first two Tehnicolor Film Processes, or any variety that would result in an old film look. ...

Silverlight Pixel Shader resource "not found"; what should the URI be?

So I've written and compiled an HLSL pixel shader with Shazzam, placed the resulting .ps file in my project, and am trying to instantiate it. No matter what URI I put, Blend tells me that the resource can't be found whenever I try to view any xaml designer, and Visual Studio just shows me a blank page, both in design view and if I try t...

Restrict the area that a WPF shader effect gets applied to

How can I restrict the area that a WPF shader effect gets applied to, in a similar manner to the way the obsolete BitmapEffectInput.AreaToApplyEffect used to work for BitmapEffects? Is there an equivalent property for shader effects, or do I have to add it myself within each and every shader effect that I'm writing? ...

XNA + Pixel Shader Difficulties

I've written a basic 2d pixel shader, and i can't seem to get it to work. If i draw with the effect active, then nothing draws to the screen. But if i disable it, then the texture draws to the screen as expected. My aim is to be able to draw an arbitrary texture to the screen, then have this pixel shader "carve" circular hunks of pixel...

Tutorials for writing 2D shaders?

I am needing to write some 2D shaders (not 3D, so no vertex shader code or any of that) in HLSL, but have a lot of trouble finding good tutorials. Do you have any resources I can use? ...

HLSL Shader to Subtract Background Image

I am trying to get an HLSL Pixel Shader for Silverlight to work to subtract the background image from a video image. Can anyone suggest a more sophisticated algorithm than I am using because my algorithm isn't doing it correctly? float Tolerance : register(C1); SamplerState ImageSampler : register(S0); SamplerState BackgroundSampler...

Photoshop PhotoFilter pixel Math

Has anyone used the photo filter in Photoshop? Edit > Adjustments > Photo Filter... It produces a really nice image tint that I've been unable to reproduce with blending modes. Has anyone got any idea of the pixel maths behind this filter? - So I can build a shader based on it. It seems to basically be a luminosity preserving colour ti...

Restricting Pixel shader on particular area of image

Hello, Is there any way to restrict Pixel shader on particular area of image. BR ...

Is there any way to apply shader effect on particular cell of a Grid

Hi, Is there any way to apply shader effect on particular cell of a Grid. BR ...

Pixelation/filtering issue in Silverlight when using a pixel shader with a rotation transformation

I am doing some game-related rendering with Silverlight, and when I attach a pixel shader to an image that has a (rotational) transformation, I am seeing a strange, fuzzy, pixelation effect. Here is a screenshot of the problem. The image on the left has just a transformation. The image on the right has a transformation and a pixel shade...

How wrap image around cylinder in Silverlight

Hi all. I am trying wrap image around cylinder in silverlight. I looked a lot in Google but don't found anything. As I know it can be done with pixel shader, but don't know how. Is it possible? Thanks. ...

Dynamically compiling and running shaders from file in XNA

Hello, im wondering if its possible to dynamically compile a pixel-shader from file and apply it to a mesh. First I'll just start with some background information. I have a system which creates HLSL pixel-shaders based on a range of data which is not really important to the question. What is important is that these shaders do not use te...