Constant Buffer By Name in HLSL

gamedev.net - 2013-06-06 01:00:23 - Similar - Report/Block

Hello all, I am currently in the process of creating a rendering system that will work with both OpenGL and DirectX. One of the things I would ideally like to do is flatten out the differences between shader programs, since they fundamentally work the same way. I have created an IShaderProgram interface which is the accessible type, and t...

Why is the pixel shader not being called?

gamedev.net - 2013-06-05 15:19:37 - Similar - Report/Block

I just follow a directx tutorial, but there is nothing in the screen. Therefore, I try to debug with PIX, and the result is the pixel shader is not being called I do not know why the pixel shader is not being called, even I create and set a pixel shader to the pipeline. Anybody have experienced this problem? Please, help me. Thank you...

[VS2012] Debugging pixel shader

gamedev.net - 2013-05-18 12:34:29 - Similar - Report/Block

Hi, I'm trying to debug a pixel shader in VS2012 but I can't access the pixel history because "This draw call is using system-value semantics and interferes with pixel history computation" The vertex shader generates a fullscreen triangle using SV_VertexID... Is it impossible to debug pixel shaders associated with vertex shaders that use...

How to override just the alpha value of a color in a shader

stackoverflow.com - 2013-05-14 01:23:00 - Similar - Report/Block

My colors are typically sent as a vec4 array into the GLSL shader, with alpha as the 4th element. I'd like to be able to dynamically adjust the alpha of all the colors in the array to a single consistent alpha uniform by sending a single alpha float to the shader rather than having to change the interleaved array on the client side befor...

GLSL blank screen

stackoverflow.com - 2013-05-05 04:42:00 - Similar - Report/Block

I am getting a blank window (white) for my GLSL shader program. My program compiles fine with a warning level of 4. The only error I am getting is from the shaders are: Both shaders (vertex and fragment) getting this error: WARNING: 0:? : ' : Version number deprecated in OGL 3.0 forward compatible context driver frgment shader getting thi...

What to do with old per-vertex normals when doing normal mapping?

gamedev.net - 2013-04-20 15:32:18 - Similar - Report/Block

Hello. I have a really small question regarding how to implement normal mapping. All the model files I have already have per-vertex normals stored in them. All the tutorials/articles I've found computes all three of the normals, tangents and bitangents per vertex by averaging the triangles the vertex is part of and then orthogonalizing th...

Glsl - Which is faster: lots of if statements or lots of seperate shaders?

gamedev.net - 2013-04-18 08:56:30 - Similar - Report/Block

Ive noticed that as I add more features to my glsl shader I have been getting really poor performance. I currently have one shader with multiple blocks of if statements that apply different effects such as normal mapping, specular, lighting and etc... I was wondering if it would be more efficent to just generate a new frag and vert shader...

GPU PerfStudio 2 - how to view HLSL code?

gamedev.net - 2013-04-16 07:32:00 - Similar - Report/Block

I'm debugging my shader on a HD 5650 with AMD's GPU PerfStudio 2 and while it shows up the Assembly, for the HLSL code it tells me: To view HLSL here add the D3DCOMPILE_DEBUG flag to your shader compilation. For best HLSL debugging experience, also add the D3DCOMPILE_PREFER_FLOW_CONTROL and D3DCOMPILE_SKIP_OPTIMIZATION flags. Even tho I h...

can't get glGenVertexArrays to work.

gamedev.net - 2013-04-15 11:20:08 - Similar - Report/Block

hi all, I'm learning GLSL recently, and trying to use vertex array object. but I just can't get things right. I use glew for OpenGL setup, and use vertex array to bind vertex attributes. while the compiler doesn't show any complaint, the output doesn't show anything neither. I try to use glsldevil to debug my shader program. it turns out...

GLSL compilation error when using QGLShaderProgram

stackoverflow.com - 2013-04-10 18:57:55 - Similar - Report/Block

I'm currently trying out some of the opengl components in Qt 5, I'm compiling on Mac OSX 10.8 with QtCreator 2.6.2, clang 4.2 I've written a very basic GLSL shader that compiles and links well in OpenGl Shader Builder, but when I try to load it using a QGLShader, it fails to compile and the log function returns no error message. Vertex Sh...

Compute Shader

gamedev.net - 2013-03-28 23:51:48 - Similar - Report/Block

Hello, i am new in compute shader programming. Unfortunately, there are no good book and other material on this topic, so i have lots of questions. Because Compute shader uses lots of threads, is it possible to use compute shader for post effect instead of rendering quad screen ? will be this technique faster, since it's multithreaded ? I...

Single big shader buffer for hardware instancing

gamedev.net - 2013-03-28 13:51:15 - Similar - Report/Block

I saw this part from the battlefield3 presentation ( http://dice.se/wp-content/uploads/GDC11_ DX11inBF3_Public.pdf ) on page 30 where they show how they transfer transformations of each instance to the shader using a single big buffer and a const buffer with indices to index this buffer at the right position using the SV_InstanceID semanti...

evolveStar Join

Trouble getting SSAO working with HLSL

gamedev.net - 2013-03-28 01:02:56 - Similar - Report/Block

I'm trying to get SSAO working in xna 4. The simplest implementation I've found is given in this article: http://www.theorangeduck.com/page/pure-d epth-ssao as it works purely from a depthmap. (the hlsl code I'm using is identical to that in the article) I'm getting this kind of banding (see attachment). Based on the directions of the band...

HLSL preprocessor directives

gamedev.net - 2013-03-25 22:42:09 - Similar - Report/Block

I'm exploring using preprocessor directives in my shaders but I read that the #ifdef preprocessor directive only checks the defined token in the hlsl file, i.e. #define in the same file (or an included file). So my question is, if I wanted to compile several versions of a shader with different tokens defined, how do I do that from c++? Th...

Weird Bug in D3D11 app

gamedev.net - 2013-03-18 21:51:40 - Similar - Report/Block

I recently started with D3D11 and I am trying to render a textured cube today but stuck on this weird bug from past couple of hrs. Here's a screenshot - Another screenshot in wireframe mode - Output from vertex shader - I re - wrote the resource init code again just to be sure. Also verified if the matrix values are being passed correctly...

DirectX 11 Rigging in Shader

gamedev.net - 2013-03-11 21:58:06 - Similar - Report/Block

Hello, I am a hobbyist game developer and am new to gamedev.net. I have been trying to make a game engine for the last few months using DirectX 11 and c++. I followed tutorials on braynzarsoft.net and I am currently working on animation with the md5 format. I currently do skinning on the cpu which is quite expensive and I hope to do it in...

Compile Shader From Memory

gamedev.net - 2013-02-28 17:33:31 - Similar - Report/Block

I have started making my own shader loader and of course it's not working! When I read from the shader file i separate the hlsl code and my own code into different strings and when i try to compile the shader code with D3DX11CompileFromMemory() I get this error message: "error X3000: syntax error: unexpected end of file" I have put a null...

Way to set HLSL constant

stackoverflow.com - 2013-02-26 15:19:42 - Similar - Report/Block

Is there any way to set HLSL (for example) vertex shader constant from c++ code in opengl-style? I mean - no d3dx, no constant-table. Shader is already compiled with fxc.exe and set. Have only LPDIRECT3DVERTEXSHADER9 and LPDIRECT3DDEVICE9. I planned to use SetVertexShaderConstant *, but found no way to translate constant name (for example...

HLSL Unpack float into 4 bytes

gamedev.net - 2013-02-18 11:30:26 - Similar - Report/Block

Hey everyone, if I pack 4 bytes into a float, is there any way for me to pass that float into a HLSL shader and un-pack those bytes again. I'm looking into this to save wastage in an instancing routine, I'd rather not have to use a whole float to represent a single byte value. If it helps, the method I'm using for packing the bytes is Bit...

Writing to render target with compute shader?

gamedev.net - 2013-02-07 05:48:31 - Similar - Report/Block

What's the best way to go about displaying an image calculated in a compute shader to the screen? Is it possible to write directly to a render target from the compute shader? Or would you have to write the results to a 2D UAV texture, then somehow swap that into the back buffer? I suppose writing to a RWTexture2D is the way to go, but how...

Rough Wood VRay Shader (Wood)

3docean.net - 2012-12-10 16:21:31 - Similar - Report/Block

This is a V-Ray Shader intended for use in 3ds Max, although the texture maps provided can be used to build any other rendering engine material shader. The textures are tillable and seamless. Each one is a 24-bit PNG file dimensioned at 3000×2065 pixels.

Storing non-color data in texture from pixel shader

gamedev.net - 2012-11-13 00:02:03 - Similar - Report/Block

I am using a pixel shader to put some data into a texture. Typically, with a float4 formatted texture, you would output RGBA color data to the texture where each color component is a 0.0 - 1.0 float value. I'm trying to use the pixel shader to store non-color data. This texture is not meant for display. Instead, once the texture is fille...

Determine 'gradient' of interpolated value in pixel shader?

gamedev.net - 2012-10-04 18:35:49 - Similar - Report/Block

I am working on a terrain shader where I use interpolated terrain weights in the pixel shader to determine the alpha that I draw the corresponding terrain texture with. Now I would like to apply some noise to the line where one terrain type (like sand) blends into another type (like dirt). However, I do not want noise where the two terrai...

Compute Shader Invocations

gamedev.net - 2012-10-04 17:58:35 - Similar - Report/Block

Hello, I am new to OpenGL and currently working on a particle system which makes use of the compute shader. I've got two questions. The first is about the compute shader itself. I create the particles and store them in shader storage buffer so I can access their position in the compute shader. Now I want to create a thread for every parti...

Error #342: device_shader_linkage_semanticname_not_found

gamedev.net - 2012-09-02 02:59:54 - Similar - Report/Block

I've stared at this for at least half an hour now and I cannot figure out what directx is complaining about. I know this error normally means you put float3 instead of a float4 or something like that, but I've checked over and over and as far as I can tell, everything matches. This is the full error message: D3D11: ERROR: ID3D11DeviceCont...

GLSL Vertex Shader error

gamedev.net - 2012-08-30 23:47:34 - Similar - Report/Block

Hello, I get an error while compiling my vertex shader. Here is the code for my shader: MaddEngine.vert GLSL vertex shader used by Madd Engine void main() gl_TexCoord[0] = gl_MultiTexCoord0; gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * gl_Vertex; When I run my application, it outputs the InfoLog to a file, here it is...

Design question, vertex and constant buffers?

gamedev.net - 2012-08-10 17:33:50 - Similar - Report/Block

So i want to manage my buffers in my renderer and i have a couple of questions. Up until now i have been creating a constant buffer for every cbuffer used by a shader, even if the buffer is the same for different shaders. I think that creating a number of shared constant buffers is a better performance wise. I decided to create only 4 con...

Help making my laptop run a game.

thestudentroom.co.uk - 2012-07-23 13:36:54 - Similar - Report/Block

I have a pretty basic laptop and just checked whether my laptop has the capability to run a game on 'Can You Run It?'. Everything passed apart from my graphics card and I was hoping there would be some way of improving it to work without replacing it as all of the individual requirements were ticked. Below is the suggestion/results for th...

world-space pixel width in vertex shader

stackoverflow.com - 2012-06-07 19:11:09 - Similar - Report/Block

I want to compute the word-space width of a pixel in a glsl vertex shader but I can't seem to get the math right. Here is an obviously incorrect example: // GLSL VERTEX SHADER #version 410 compatibility uniform vec4 viewport; // same as glViewport​ in vec4 gl_Vertex; void main () gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; f...

Is it possible to draw curves using SFML?

stackoverflow.com - 2012-05-27 02:37:38 - Similar - Report/Block

I am using the SFML library, which in its latest RC allows you to manipulate vertices and draw them like so : // define a 100x100 square, red, with a 10x10 texture mapped on it sf::Vertex vertices[] = sf::Vertex(sf::Vector2f( 0, 0), sf::Color::White, sf::Vector2f( 0, 0)), sf::Vertex(sf::Vector2f( 0, 100), sf::Color::White, sf::Vector2...

HLSL Passing a single float to PS?

stackoverflow.com - 2012-04-14 05:54:28 - Similar - Report/Block

I'm working through Frank Luna's "DirectX 9.0c: A Shader Approach" book and I'm stuck on exercise 2 in chapter 10. I'm supposed to calculate a float value and pass it to the pixel shader so I can calculate "toon lighting". I understand the theory behind how the calculations work, but I can't seem to figure out how to pass a single float...

GLSL GPU skinning with 3rd party shader

stackoverflow.com - 2012-04-13 09:57:54 - Similar - Report/Block

I have implemented GPU skinning for Collada files using Assimp andx my own OpenGL renderer. This is working fine. My application should allow, 3rd party vertex and fragment shaders to be specified, and should work along with skinning. An example use case could be that, this foreign shader bends the space about the Y-axis and adds fog to t...

Implementing list position locator in C++?

stackoverflow.com - 2012-04-02 00:36:06 - Similar - Report/Block

I am writing a basic Graph API in C++ (I know libraries already exist, but I am doing it for the practice/experience). The structure is basically that of an adjacency list representation. So there are Vertex objects and Edge objects, and the Graph class contains: list<Vertex *> vertexList list<Edge *> edgeList Each Edge object...

GLSL Vertex Shader compiles with no display

stackoverflow.com - 2012-03-25 03:45:32 - Similar - Report/Block

I'm trying to implement phong shading to no avail. I am building the shaders bit by bit (which could be an issue in itself) but here is where I am at currently. I would expect this to output my result (the Utah teapot) as a white image on my black background. It does this correctly when I remove line 18 from the vertex shader, but when th...

How important to send Interleaved Vertex Data on ios

stackoverflow.com - 2012-03-21 22:17:48 - Similar - Report/Block

I am using Assimp to import some 3d models. Assimp is great, but it stores everything in a non-interleaved vertex format. According to the Apple OpenGL ES Programming Guide, interleaved vertex data is preferred on ios: https://developer.apple.com/library/ios/ #documentation/3DDrawing/Conceptual/Open GLES_ProgrammingGuide/TechniquesforWorki ...

Increment by one automatically the -"number" in if statement

stackoverflow.com - 2012-03-17 16:54:08 - Similar - Report/Block

I have a problem in Python. How can I increment by one fully automatically the -"number" present in this if statement? An example to understand me. I have this situation def name1: if (dictionary[class.methodclass()][constan t - 1] == dictionary[class.methodclass()][constant - 2] == dictionary[class.methodclass()][constant - 3] == ldic...

Emulating the GLSL flat qualifier in GLSL 120

stackoverflow.com - 2012-03-15 12:02:32 - Similar - Report/Block

I want to emulate flat shading in a GLSL shader. Usually I would do that by passing the normal with a qualifier to prevent interpolation in the fragment shader. However, is not available on GLSL 120. How can I emulate it without duplicating the vertex data? (This is premature optimization, rather post-mortem.)...

graph-tool: how to access properties?

stackoverflow.com - 2012-03-02 02:34:13 - Similar - Report/Block

I would like to store instances of a class in a graph-tool graph, one object per node (or 'vertex' as graph-tool calls them). I am trying to use a vertex property as that seems to the be the way to do this def MyClass(object): def __init__(self, title): self.title = title graph = Graph() my_obj = MyClass('some title') vertex...

How do I load a texture into a shader (DirectX11/SlimDX)

stackoverflow.com - 2012-02-28 22:08:07 - Similar - Report/Block

I have a Texture2D readily available; I have an apparently-working shader texture sampler and shader texture variable that I can put that Texture2D in. The only problem is, I don't know how to load a texture into a shader in DirectX11 - And either Google is being unhelpful, or it's just my inability to construct good search terms. What I...

Shader for Android OpenGL ES

stackoverflow.com - 2011-01-31 11:52:51 - Similar - Report/Block

Is it possible to use vertex or pixel shaders in android app? please give an example if possible of setting up shader.


Fill out the form you see below. Registration is free, fast and simple.
If you are already registered, sign in page login.

Web Site :
Required Field
First Name :
Required Field
Last Name :
Required Field
Email :
Required Field
Sex :
Required Field

evolveStar.com is free for ever !

evolveStar.com provides a search engine that allows you to gather information to write their own blog.

evolveStar.com enhances the sources displaying the logo of the site.

If you want to remove your site or you believe a site listed infringes copyright, please report it to: info@evolvestar.com

Specifies the subject copyright violation and the url of the page

evolveStar.com respecting the law DMCA (Digital Millennium Copyright Act) will immediately remove whatever its merits.

Next will be effectual and relevant checks.

Who We Are Partner Advertising Contacts Privacy terms Help & FAQ

© Copyright 2010-2017 Fabrizio Fichera. All rights reserved.