Quantcast
Channel: Questions in topic: "compute shader"
Browsing all 287 articles
Browse latest View live
↧

Compute Shaders and For Loops !?

Hi, i', trying to make super simple GPU RayTracer using Compute Shader. It works well, however there is something strange to me. I am not familiar with shaders to much. So i have a loop body with...

View Article


How do you see the results of compute shaders in the debugger?

I'm trying to write some particularly complex functionality on the gpu that would be really good if I could at least see the raw data but I have no idea how. Initially i thought my code was broken...

View Article


Compute Shader Pass RWStructuredBuffer by Reference

I was curious if there is a way to pass a structured buffer around by reference. With both structured buffers and arrays I don't want them to be copied entirely when passed to a function, because this...

View Article

advice for computing and rendering many, many line segments ?

I'm thinking about a unity port of my iOS app "[Prism HD][1]". The fundamental rendering task each frame is this: 1. Compute a whole bunch of line segments to simulate optical effects. " many" = maybe...

View Article

fragment shader different color for every vertex?

can i make different colors fore every instance of this shader? do i have to send instance to o.output or something? how can i do it? StructuredBuffer buf_Points; StructuredBuffer buf_Positions; struct...

View Article


Computer Shader parsing

I am trying to set a StructuredBuffer from a C# file. I'm not sure how I would do this as C# as far as i'm aware does not support the float3 type, so I was thinking that maybe it would be a Vector3...

View Article

How to get the Cascaded Shadows' split spheres positions?

Hello! In order to compute the directional cascaded shadows in a shader (as in Internal-PrePassCollectShadows.shader or UnityCG.cginc) we need several informations easily findable through the...

View Article

DrawProcedural draws nothing although buffers are assigned properly

Hi, it's the first time I acually need help from you guys. I have a compute shader that calculates the mesh for a tube along a spline. The resulting mesh looks like this: ![alt text][1] This was drawn...

View Article


Unity Shader Stream Output Stage

Do Unity 5 shaders have access to the stream output stage in the DX11 pipeline? Reference: https://msdn.microsoft.com/en-us/library/windows/desktop/bb205121%28v=vs.85%29.aspx I want to compute new vert...

View Article


Posible Bug with Compute Shaders and DirectX11?

Hi everyone. I am experiencing some kind of bug. I am using the Capture Panorama Asset on my project. It is quite simple, so no big deal is involved. I have taken several pictures with said asset on...

View Article

Setting color for compute shader structure trough c#

I have shader that has structure struct Particle { float3 position; float3 velocity; float3 color; }; And is used here o.color = particleBuffer[instance_id].color; Here's my c# structure public struct...

View Article

How can you detect judder in VR?

I've been working in OpenVR (the Steam API), and every once and a while I will get some judder. Is there a way to detect exactly what frames juddered/when juddering will occur? I'd like to minimize...

View Article

Problem with ComputeShader and RHalf RenderTexture

There is a simply compute shader: #pragma kernel CSMain RWTexture2D _Texture; [numthreads(32, 32, 1)] void CSMain (uint2 id : SV_DispatchThreadID) { _Texture[id] += 0.1; } Code which creates a RHalf RW...

View Article


Pass Matrix4x4 to ComputeShader?

How can I pass a Matrix4x4 parameter to a ComputeShader? Materials have the SetMatrix method but ComputeShaders lack this. I thought maybe SetFloats to pass the Matrix4x4 as a float array like I would...

View Article

getting texture from shader into c# script. Also: best way to get values from...

Dear unity community as I am pretty new to unity I would be happy for some guidance into the right direction. I use a shader to modify an image sequence in runtime. This shader is applied as a texture...

View Article


Do uninitialized RenderTexture areas lead to wrong texturing (tiled...

I am working on a procedural planet engine and face a problem when creating a tiled RenderTexture which can hold e.g. a NormalMap for a larger number of planet planes. Now I am trying to implement a...

View Article

ComputeShader buffer, change count at runtime

Is it possible to change the buffer count, once it's been initialized? For example every update call (sometimes the point cloud is bigger or smaller than the init value) buffer = new ComputeBuffer (...

View Article


ComputeBuffer low-level access in Direct3D 11 in Unity 5.5.0B3

Hi all, I just discovered **ComputeBuffer.GetNativeBufferPtr** in Unity 5.5.0B3. Very very awesome!! I'm trying to use the ID3D11Buffer with CUDA interop but it keeps crashing. When looking at the...

View Article

Geometry Shader is drawing triangles in wrong vertex positions

Hi, After learning about shaders in past couple of weeks, I wanted to try something on my own. So I tried to draw a face for a cube using Compute Shader and Geometry Shader. Compute shader is...

View Article

UVs are not mapped properly in my unity surface shader

Hi, I am trying to use compute shaders with surface shaders with dx11 tesselation shaders ( Using unity's distance base tesselation example from unity guide ). I copied the generated code from surface...

View Article
Browsing all 287 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>