unity3d-shaders

How to fix normals on shader

让人想犯罪 __ 提交于 2020-03-21 05:51:50
问题 I have a problem with a shader I made/cobbled together from bits of code Initially my plan was to was a shader at runtime Shader on disabled object? But this seems to be the wrong thing to do, as its my understanding now that shaders can't be swapped at runtime. So I would like to be able to correct the shader I have so that I can fade from colour to greyscale but not have part of the model disappearing. I really don't understand shaders... The code I have so far Shader "Custom

How to fix normals on shader

微笑、不失礼 提交于 2020-03-21 05:51:04
问题 I have a problem with a shader I made/cobbled together from bits of code Initially my plan was to was a shader at runtime Shader on disabled object? But this seems to be the wrong thing to do, as its my understanding now that shaders can't be swapped at runtime. So I would like to be able to correct the shader I have so that I can fade from colour to greyscale but not have part of the model disappearing. I really don't understand shaders... The code I have so far Shader "Custom

Shader on disabled object?

喜你入骨 提交于 2020-02-15 06:01:45
问题 Hi unity peoples I found this effect (disabled greyed out) while looking for something in the hierarchy panel I like it! - How would it be possible to add this kind of effect to game objects in game. are there any easy to implement solutions. is it possible to use what unity is doing here in game? for example - on a locked item? I'm not even sure what to search for. If this is a shader, or how this would be working. void OnItemEnabled() { ? } Some experiments so far Using a lit shader, it

Why material added to ui panel is not visible in android build but works fine in editor window in unity3d?

微笑、不失礼 提交于 2020-01-06 06:47:21
问题 The material added to the UI Panel is working in the editor window but not working in android build. How to fix this? Editor Screenshot Android screenshot Note: I have tried adding a shader to "always Included shader" list in the project setting menu. still not fixed. I'm not altering the shader/material in the code. This is worked fine in a previous unity version. (my unity version is 2018.3.11f1) The same material works fine in other game objects (like a cube, etc,.), but not works with any

YUV shader for Unity?

感情迁移 提交于 2019-12-24 03:01:56
问题 I have some (proper, planar) YUV textures in Unity, and I just want to see them for dev use. Is there actually a working YUV shader for Unity (their shader language variant) kicking around? It's simple enough conceptually to convert from YUV to RGB .. but a bit fiddly. 回答1: YUV to RGB conversion shader: Shader "Hidden/YUVtoRGB" { Properties { _MainTex ("Texture", 2D) = "white" {} } SubShader { // No culling or depth Cull Off ZWrite Off ZTest Always Pass { CGPROGRAM #pragma vertex vert #pragma