ShaderLab on Unity3d Indie
Hi,I'm using Unity3d Indie and currently considering to get my hands dirty with shader code. Are there limitations on the Indie version regarding shaders ? What problems can I expect ? Can I solve...
View ArticleProblem, Textures updated by plugin won't behave as expected in combination...
Hi I've already posted this issue in the forums, but I still haven't got any answer. I'm developing under Windows 7 with a GF 210M (DX 10.1) and have the following problem. I'm updating 2 textures from...
View ArticleIs there a way to communicate between the gameobject and the shader?
Is there a way to set some sort of flag on your gameobject so that custom HLSL shader code and read it and change its properties accordingly? for example, a gameobject could tell the material/shader to...
View Articlecg to unitycg : Glowing shader
Hi, I find a shader on Ogre that do exactly what I want but I never do Cg/HLSL before. I understand how to exploit Cg/HLSL but this shader is really complicated according to me :x...
View Article"Can't open include file "HLSLSupport.cginc""
I'm getting this error in all of my pro shaders that include "HLSLSupport.cginc", but I can't find any information on this error, as if nobody has ever gotten it before. One of my projects has this...
View ArticleShader with "alpha" parameter no longer writes to Z-Buffer
I'm working on a set of custom shaders to override Unity's built-in terrain shaders. When I add the "alpha" parameter: #pragma surface surf Lambert alpha ...suddenly distant terrain trees start drawing...
View Articlewhat would you choose to write unity shaders GLSL, HLSL/CG or Surface lang?
Hi!, I'm pretty new to shader programming. I want to start to write some of them but have a little problem about what language to choose. I have read a bunch of threads, have seen a bunch of videos and...
View ArticleCan this shader run in unity?
Hello! First of all, I have no idea about shaders. I would like to run this shader inside Unity ( http://glsl.heroku.com/e#6303.3 ) I read it should be in a language called CG but I have no idea how to...
View ArticleCreating a cup of water using Unity Pro Water
I've been having this problem for a few weeks now and I can't figure out the best way to address it. I am trying to create a beaker filled with water but I am having problems when rotating my camera...
View ArticleSharing variables across shader passes. Is it possible?
Was wondering if it is possible to share variables across passes. To my knowledge it isn't, but it would make life easier for me. My case is: I want to skip the second pass when the first pass is...
View Article2D Water top surface profile
I am trying to create the effect of the water surface thickness with a vertex-fragment shader. I am in a 3D game environment but It's a scroll view so a "2D" view. [Here][1] is a good tutorial of...
View ArticleFog shader
Hi, I have some difficulties with my fog shader. I have a good visual result but the problem is that the gradient is based on the camera's position, it moves as the camera moves. I don't know how to...
View ArticleCan a CG shader fail to work on hardware?
I've been writing some shaders and trying to find out if I need to write a backup for my CG shader in HLSL. All the references to HLSL in Unity I can find seem to indicate that CG/HLSL are...
View ArticleShader Variable Types
I have a simple question. what are the meaning of : half4 myHalf; myHalf.yyyy; myHalf.xxzz; // or myHalf.yw Thanks a lot !
View ArticleVertex and Fragment Shader worldNormal
How to access/calculate worldNormal in a Vertex and Fragment shader ?
View ArticleBitwise operations in hlsl, is there an alternative method?
So, i'm writing a shader, and part of this shader involved IBL. I'm trying to find a good way to sample from a hemisphere (cubemap) using importance sampling, and part of that involves using the...
View ArticleHow do you render points as circles rather than squares?
Currently I have a script that I attach to a parent mesh object that essentially runs the mesh.topology command and sets the mesh to points at run time. The points show up as squares (planes, not...
View ArticleSwapping Compute Shaders
I am editing some point cloud volume data in Unity, on the GPU. My issue is that I have to edit my data in multiple passes (applying multiple different compute shaders to the same data). Is it possible...
View ArticleMore than one Kernel in Compute Shader
Hi, I'm experimenting with compute shaders and wanted to test having more than one kernel. I created a compute shader where one kernel fills a buffer with "red" the other with fills it with "green". In...
View ArticleConvert shader from DirectX 9 to DirectX 11
I have this shader that works when Unity is set to use DirectX 9. I am porting the project to DirectX 11 now and the shader doesn't work as expected. Not being an expert in HLSL I played around a bit...
View Article