Questions tagged [hlsl]

HLSL(High Level Shader Language) is a proprietary shading language developed by Microsoft for use with the Microsoft Direct3D API

HLSL is a C-like language developed by Microsoft and it's used in Direct3D API to define shaders. HLSL is used by Direct3D 9, and is required by the unified shader model in Direct3D 10+.

HLSL can be used to define pixel shaders, vertex shaders, geometry shaders, compute shaders, tessellation shaders, raytracing shaders and mesh shaders. It is analogous to for OpenGL.

Vulkan SDK and DirectX Shader Compiler also supports compiling HLSL shaders into SPIR-V, enabling its use in Vulkan applications.

Resources

1642 questions
0
votes
1 answer

DX11 Vertex shader being ignored

We are porting out dx9 code to dx11 and have followed tutorials as far as getting a triangles on the screen. However, any changes to our vertex shader seem to be ignored, so it always passes through input position and colour. Even if we do mad…
user3162134
  • 287
  • 1
  • 10
0
votes
1 answer

directx11 Point light issue. Objects translated from the origin are not lit correctly

As stated in the title my issue is that my point light doesn't seem to take into account the current position of any objects. It appears to light the object as if it is still being drawn around the origin. Example: the current scene i am using…
user3640122
  • 15
  • 1
  • 6
0
votes
1 answer

HLSL shader shows wiered colors

I am trying to create a shader where i have as input the positon of the vertex, some transformation matrixes and a float4 for the color of the vertex. The manipulation of the position works fine but i dont get the correct color out of it. Okay so…
bemeyer
  • 6,154
  • 4
  • 36
  • 86
0
votes
0 answers

Gamma Space and Linear Space with Shader

I am using Unity and I can choose between two color space mode in the settings: Gamma or Linear Space. I am trying to build a Custom Lighting Surface shader but I am facing some problems with those Color Space. Because the render is not the same…
MaT
  • 1,556
  • 3
  • 28
  • 64
0
votes
0 answers

Channel Live Streaming

Pleaaase its so critical can any one help me to stream this url : i tried this : http://new.islamahmadiyya.net/live-no-links.html and the same but with rtsp : rtsp://mtaintl.mpl.miisolutions.net:1935/mtaintl-live-1/definst/mp4:MTA3_300k.stream i…
Asmaa Salman
  • 67
  • 1
  • 8
0
votes
0 answers

Converting <-1;1> to x y coordinations

I need to convert <-1;1> to x y coordinations to draw a triangle on screen. vertices[0].Position = new Vector3(-0.5f, -0.5f, 0f); How can I convert x y to that float number precisely?
0
votes
0 answers

hlsl outputs blurry image

I used a code I found in the internet for effect and it worked perfect but one thing was wrong it blurried my output screen a bit. What it should be: http://i.imgur.com/5DwEMDR.png What it is currenty: http://i.imgur.com/tL0HYIM.png I tried to…
0
votes
1 answer

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…
DeadMG
  • 111
  • 1
  • 5
0
votes
1 answer

How to create wpf effects that extend outside the controls bounds?

I've been fiddling with shazzam to create all kinds of cool PS effects but I still don't understand how an effect can affect areas outside the element its applied on, like the original blur or dropshadow effects for an exmaple. Can anybody…
Jake Freelander
  • 1,471
  • 1
  • 19
  • 26
0
votes
1 answer

Gaussian blur shader is not blurring

I'm trying to implement a gaussian blur shader in HLSL, the code seems correct but resulting image is all white unless I put a dirty hack by diving the result color by 1000. Even though it shows something now, it is just incorrect as colors are…
aybe
  • 15,516
  • 9
  • 57
  • 105
0
votes
1 answer

Separating Different Types of Buffers in HLSL

Is it possible to separate the different types of data being passed into HLSL shader? For example, most tutorials that I have seen setup the buffer as struct vertin{ float4 position: POSITION; float2 text : TEXCOORD; float4 norm :…
mma1480
  • 659
  • 1
  • 9
  • 18
0
votes
1 answer

Shader - Camera Space top Vector

I am not focused on a particular shader language. But I am trying to find a way to have a vector always coming from the top of my view. Here are some screenshots to illustrate what I need. Edit: I would like to obtain a mask. Here is a sample code…
MaT
  • 1,556
  • 3
  • 28
  • 64
0
votes
1 answer

HLSL Perlin Noise and XNA

i need a real time Perlin Noise generation for a 2d game i am implementing. The CPU noise runs fine, but needs ~1 sec for half my screen size (1920 x 1080). I can scale it up about 4 times without too many artifacts but still that is a little slow…
crush3dice
  • 198
  • 1
  • 2
  • 15
0
votes
1 answer

Sampling custom float texture2D in HLSL

I am wondering how to actually sample the data I am passing to the shader file. I am using two methods, is it the same for both? Are there any resources online for me to actually read up on this sort of thing? Compiling at 5.0 but the version number…
Questioning
  • 1,903
  • 1
  • 29
  • 50
0
votes
1 answer

Transparency shader cover model

I am using XNA, implementing the HLSL shader and i have a problem with transparency in the shader; When rendering two models and they are facing each other the model behind is seen only when it is first rendered Let me explain... blue cone =…
1 2 3
99
100