shaders

Creating high performance animations in WPF

Hi All, I'm in a situation that requires many animations with effects like transparency to be applied but when there are about 10 of them running, my application slows down to a grinding halt! :( I also, tried implementing a particle like effect using a frame by frame manual animation using the CompositionTarget.Rendering event, which ...

video file + fragment shader under Linux

coming from Windows (MSVC++ 2005): What SDK or alike do you recommend to port an C++ application (DirectShow+Direct3D) to Linux playing video file + using fragment shaders? Tom ...

Shader files for hue\saturation\brightness

I am new to write a shader files(.fx), how can i write shader file to set hue\brigtness\contrast. ...

Basic samples for shader in Managed DirectX

I am new write a pixel shader and use in my managed directx project, where i can get some basic sample to start it. ...

XNA .Fbx textures

Hello. I'm using the standard .fbx importer with custom shaders in XNA. The .fbx model is UV wrapped properly and is textured appropriately when I use BasicEffect. However when I use my custom effect I have to load the texture in as a parameter, and it is not mapped correctly. Questions: 1) How can I texture my .fbx model properly usin...

D3D Performance comparison, shaders vs built in shading

Hi there. I have a running 3D engine built in D3D (via SlimDX). To avoid interupting the rendering pipeline I have batched together many objects with the same material into bigger meshes (to reduce state switching). This have worked well and gives a good performance level for my need. The issue I am running into is that I, during runti...

Shader limitations

I've been tuning my game's renderer for my laptop, which has a Radeon HD 3850. This chip has a decent amount of processing power, but rather limited memory bandwidth, so I've been trying to move more shader work into fewer passes. Previously, I was using a simple multipass model: Bind and clear FP16 blend buffer (with depth buf...

Shaders with pygtkglext

Do someone know how to get glsl shaders work in gtk-opengl window? With glut all glCreateProgram etc. functions works, but when I tried to put the same gl code into pygtkglext window, its complaining about NullReference: OpenGL.error.NullFunctionError: Attempt to call an undefined function glCreateProgram, check for bool(glCreateProgram...

Problem mapping textures to VBO in OpenGL

I'm having trouble getting a texture to map onto geometry properly with OpenGL. In fact I seem to have even broken the colour interpolation that used to work fine. I've created a test case in C99 that uses SDL, GLee and SOIL. #include <stdbool.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <assert.h> #include <S...

Cg shaders not being applied after switch to glVertexPointer

My renderer used to render geometry with the old fixed function stuff using glBegin/glEnd. After switching it to use vertex arrays via glVertexPointer et. al., my Cg shaders stopped showing up. If i just do a regular texture binding, it works fine, so the array data is solid. Also if I use the old glBegin/glEnd system, the Cg shaders wor...

glCreateShaderObjectARB( GL_FRAGMENT_SHADER_ARB ); crashes !

Hello there, I have an iMac with ATI Radeon 2600HD which supports Fragment_shader_arb. But whenever I use that function, it crashes the program. Ironically, it works on a windows installation in the same machine without any problems. I'm running OS X 10.6.2; Can anyone please help me out! P.S. Vertex shaders work fine without any prob...

Pixel shader weird compilation error

hi, I'm experiencing with shaders a bit and I keep getting this weird compilation error that's driving me crazy! the following pixel shader code snippet: DirectionVector = normalize(f3LightPosition[i] - PixelPos); LightVec = PixelNormal - DirectionVector; // Get the light strenght factor ...

Triangle count for model is doubled during render

I am working with the Trinigy 3d engine, and it reports models to have twice as many triangles during render than it does in the model display (let's say 4000 instead of 2000). If I render the model with an additional outline shader, it reports 6000 triangles, so it's not a simple duplication. What could be the problem? ...

How do shader compilers work?

Does anyone have references to documents and research specific on the inner workings of shader compilers/graphics drivers compilers? ...

YUV Textures and Shaders

I've always used RGB textures. Now comes up the need of use of YUV textures (a set of three texture, specifying 1 luminance and 2 chrominance channels). Of course the YUV texture could be converted on CPU, getting the RGB texture usable as usual... but I need to get RGB pixel directly on GPU, to avoid unnecessary processor load... The pr...

OpenGL Shading Language backwards compatibility

I've noticed that my GLSL shaders are not compilable when the GLSL version is lower than 130. What are the most critical elements for having a backward compatible shader source? I don't want to have a full backward compatibility, but I'd like to understand the main guidelines for having simple (forward compatible) shaders running on GP...

OpenGL ES 2.0 Rendering with a Texture

The iPhone SDK has an example of using ES 2.0 with a set of (Vertex & Fragment) GLSL shaders to render a varying colored box. Is there an example out there on how to render a simple texture using this API? I basically want to take a quad, and draw a texture onto it. The old ES 1.1 API's don't work at all anymore, so I'm needing a bit ...

Is the binormal of a vertex the cross between its normal and tangent?

I'm trying to find out what a binormal is in the context of graphics programming but coming up short, I saw on a site that the binormal was being calculated as the corss between the normal and tangent (i.e. cross(normal, tangent)), is this the correct way to calculate a binormal? ...

Shader vs Shader Material , papervision specific , general insight welcome.

hello overflow. I asked this question on the pv3d forum and not a single person could, or cared to answer it. Im relatively new to 3d so i apologize if this is common sense to some. I have a sphere , in which i am applying a CellMaterial to. Looks great. I noticed that in the papervision sdk , there is also a CellShader. Should I...

OpenGL Shader Compile Error

I'm having a bit of a problem with my code for compiling shaders, namely they both register as failed compiles and no log is received. This is the shader compiling code: /* Make the shader */ Uint size; GLchar* file; loadFileRaw(filePath, file, &size); const char * pFile = file; const GLint pSize = size; newCashe.shader = glCreat...