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

unrecognized identifier 'fixed4' in Compute Shader

I'm trying to make a compute shader that uses Lighting.cginc, but it always fails because fixed4 (and fixed in general) is not a recognized variable type. Shader error in...

View Article


Use compute shader to convert RenderTexture to Vector4 array

I am making a picture analyzer which needs the accurate values of color. When I tried to parse float values from compute shader to my script via **Texture2D**, it's not accurate. For example, when...

View Article


Creating a native UAV into a meshes native vertex buffer (DX11)

I have a native plugin which generates mesh data using compute shaders. My ideal solution would be to pass down the native vertex buffer pointer down to the plugin, create a UAV into it, and bind that...

View Article

#include not finding compute file

I'm working on a shader that requires me to be able to 'latch on' to another compute shader. I'm using #Include "/Includes/LookupTables.compute" and that shader is in a folder named Includes and I've...

View Article

My mesh is spagetti??!

Hey! So I decided to calculate noise on a compute shader for my infinite terrain. My issue is when I get the data the mesh I get in return is spaggetti. Like they arent connecting to the correct...

View Article


Generating a plane with a compute shader.

I'm making a JRPG style dungeon crawler, and I'm currently trying to generate the floor. I currently have the ability to generate the floor using the mesh generation code given in the Brackeys tutorial...

View Article

Create Mesh from Triangle Data Created on ComputeShader

Hi! I have recently finished working on a terrain generation system that utilizes the GPU to generate the noise for the terrain and calculate the vertices and triangles of each terrain chunk. After I...

View Article

Compute Shaders Tutorial/Docs

Searched the web for compute shaders tutorial, everything I have seen so far is shallow. I need indepth tutorial/material/books etc... cause this seems to be an important subject. Even unity's own docs...

View Article


Are ComputeShader dispatches sequential?

If I dispatch 3 different kernels on the same compute shader like this: _computeShader.Dispatch(kernel1, x, y, z); _computeShader.Dispatch(kernel2, x, y, z); _computeShader.Dispatch(kernel3, x, y, z);...

View Article


Compute Shader threads fail randomly on mobile, but work fine on PC.

You can see here, failed threads show up as black or light blue- Dark blue vertices were fine (probably) https://cdn.discordapp.com/attachments/552308534906454017/663503305816670231/Gif_503.gif Another...

View Article

Shader Raycasting From Camera

Hi, I need to raycast from a secondary camera taking into account its properties (focal length, aspect ratio,etc) and then get the pixel hit in a shader for the main camera so that you can visualize...

View Article

Android Crash on UpdateComputeBuffers in libunity.so

**The Problem** I have a bunch of ComputeBuffers and RenderTextures in my 2D game, and up until recently, they were working just fine. Now, all of a sudden I am seeing crashes after the Start()...

View Article

Texture sampling will move when sampled same position.

I'm facing a sampling problem. I'm trying to use Compute Shader via `SampleLevel` method. I've written shader code like below. [numthreads(8,8,1)] void Test(uint2 id : SV_DispatchThreadID) { float w,...

View Article


Compute shader loop in editor

I'm working on a tool for the editor in which you can take a sprite and it blurs it for you. I'm using a compute shader with buffer approach to blur it but blur requires multiple passes. After using...

View Article

ComputeBuffer stays empty in compute shader in URP

I'm trying to pass a ComputeBuffer to read on my ComputeShader with the Universal Render Pipeline, and everything works, except that the buffer remains empty in the shader. I'm relatively new to the...

View Article


perform action on shader compilation/update

i am using a compute shader to generate a terrain (height map), then generate and stream a mesh into the live game. ---------- in order to iterate faster, i would like to automatically restart the...

View Article

Render texture copy to splat map problem

Hi, i'm modifying renderTextures in a compute shader thrue this simplified code: Compute shader RWTexture2D splat0; // splat map RWTexture2D splat1; [numthreads(8, 8, 1)] void UpdateAll(uint2 id :...

View Article


How can we get mesh vertices position which has been deformed by the shader...

Hi, I am working on procedural cloud generation. So have generated custom plane mesh which is in a rectangle shape and for cloud effect and it’s shaping I have developed shader on shader graph. This...

View Article

Persistent Data in Compute Shaders.

Hey there, I have created a little raytracer in unity using the compute shader and now I want to store (for example) the last 100 outputs on the GPU memory for later calculations. The CPU does not need...

View Article

GraphicsBuffer for vertices inquiry

Hi, I wanted to pass some vertices from CPU to GPU's computeShader's kernel via GraphicsBuffer, but I stumbled upon some incosistent information....

View Article
Browsing all 287 articles
Browse latest View live


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