Quantcast
Channel: Questions in topic: "hlsl"
Browsing all 206 articles
Browse latest View live
↧

Visual Studio Community on Mac will not recognize HLSL

I use Visual Community on Mac with Unity, and what to edit HLSL shaders. I find that I get some syntax colour highlighting, if I use ".compute" or ".cginc" (but not ".hlsl") file type suffixes, but no...

View Article


Shader float4 component values computing strangely

Hi, I have a blur shader and I'm attempting to make the radius of the blur dependent on the alpha value of the colour read from the fragment. Here's the horizontal pass (the vertical pass is very...

View Article


How do you port old shaders to hlsl so they work with the new post-processing...

I recently upgraded my project's graphics pipeline to the new lightweight srp. When it comes to shaders I'm a complete novice. I tried to port several of my old shaders that I had attached to my camera...

View Article

How to get Initial texture in Post-Processing Stack v2

Hello. I'm trying to write a custom post-processing shader with new **Post-Processing Stack v2**. I already have a few effects in my pipeline, but I need to determine whether I apply them or not based...

View Article

Why color not rendering in my shader?

Hello all, I'm trying to create a wireframe shader with inner color. So it's not transparent but has a color. So I have this shader: Shader "Custom/TransparentSingleColorShader" { Properties{...

View Article


Unity Shader Code Help.

Hello Everyone. I was playing a game called as Stairs by Ketchapp..I could create everything but i am stuck on the shader effect that comes into the picture when the user makes a combo like thing, You...

View Article

Bizzare error with for loop and tex2D in HLSL shader

I'm trying to make two for loops within a post-processing shader for Unity in HLSL, however I'm having a weird problem. When I try and use `tex2D` on `_MainTex`, if I try to do so before the for loop...

View Article

Vert/frag shader not receiving shadow despite all relevant code being present

Hi there, I've been working on a cartoon shader for my game and have been trying to implement received shadows. I have included the necessary parts: #pragma mutli_compile_fwdbase // at the start of the...

View Article


Particle system source code?

Hi! I’m interested in making particle systems in MMD by making a particle system in unity and somehow importing it into MMD. As far as I know, MMD takes particle systems in the form of .fx files coded...

View Article


Recreating basic function in C#

Hi. **How would I go about computing the results of `UnityObjectToClipPos(foo).w` in c# for a given camera and world-space vertex?** I understand w acts as some sort of scale factor, and is used by the...

View Article

How is _WorldSpaceLightPos0 calculated for a directional light?

I want to make a custom lighting system, but I have no idea how to calculate the same values that are in _WorldSpaceLightPos0. Any help?

View Article

#Include from /Packages directory

I've got a HLSL file in my Assets/Graphics/Shaders/Includes/ directory and I'm trying to get the HDRP light values from LightDefinition.cs.hlsl. This file is located within the HDRP package, and the...

View Article

Why won't this vertex distortion shader work as intended?

Hello. I tried writing this shader to distort my vertices' positions using a "watery" texture's grayscale. The thing is, they are always distorting by the same amount, so it looks like the sprite is...

View Article


Find position of pixel that's currently being calculated in shadergraph...

I am creating a shader with a custom function that highlights edges on a 2D texture. For my calculations I need to know which pixel is currently being calculated. There are two ways to do this: - Use...

View Article

Setting hlsl buffer value from c# code?

Hello, I've been working on porting a 3rd party image effect hlsl shader to Unity and I have a buffer to set for the shader to work correctly. Buffer _bSamplePattern : register(t2); My question is, is...

View Article


sampler2d object has no methods

Hello there. I'm trying to write my shader, in order to get a depth texture that has to be assigned to the camera, in order to get a black-and-white description of the distance of the objects within...

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


HLSL Post Process Shader Fixing UV/Texcoord

Hey, I am trying to make a simple Wobble shader using HDRP and custom post processing in HLSL. However, I am getting black areas on the edges of the screen where texcoord's x value is not within the...

View Article

HDRP shaders won't compile with shader model 6.3

When I build a pathtracing project with Unity 2020.1.0b1 and HDRP 8.0.1 I get errors like that. error: validation errors at 0x175e48e3398 inside block...

View Article

Make my volumetric cloud code cast shadows

Hi, I have a cloud rendering shader that uses 3d noise and raymarching. It's a screen-wide frag shader, base on this tutorial: https://www.youtube.com/watch?v=4QOcCGI6xOU ---------- Currently, I...

View Article
Browsing all 206 articles
Browse latest View live


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