التخطي إلى المحتوى الرئيسي

المشاركات

عرض الرسائل ذات التصنيف SHADERS

High end realistic polish in your game?

Wondering how to achieve that high end realistic polish in your game? You should really check out physically-based surface shaders! Learn all about a ridiculously cool new framework by RUST LTD on our blog!  http://blogs.unity3d.com/?p=13775 Post by Unity3DIY .

[Shader] Transparent single color shader

This shader can give the object a solid color. And the alpha value can be adjusted by adjusting transparency. In Unity4.0 test without any problems. . . Shader "Custom / TransparentSingleColorShader" {  Properties {  _Color ("Color", Color) = (1.0, 1.0, 1.0, 1.0)  }  SubShader {  Tags {"RenderType" = "Transparent" "Queue" = "Transparent"}  Blend SrcAlpha OneMinusSrcAlpha  cull Off  LOD 200 CGPROGRAM  # pragma Surface Surf Lambert fixed4 _Color; / / Note: pointless Texture coordinate. I Could not GET Unity (or Cg)  / / to accept an empty or omit the Inputs Input Structure.  struct Input {  float2 uv_MainTex;  }; void Surf (Input IN, inout SurfaceOutput O) {  o.Albedo = _Color.rgb;  o.Emission = _Color.rgb; / / * _Color.a;  o.Alpha = _Color.a;  }  ENDCG  }  FallBack "Diffuse"  }

Shader Programmes

A shader programme is dedicated computer programme that runs in the graphics processing unit (GPU). Whenever we draw an object within our scene, we have to possess a shader programme allowed that defines how to modify the object into the proper location on our drawing surface, and how to color the area. In WebGL, shader programmes are made from 2 separate parts, which we create.    1 vertex shader, which describes how to transform the vertex positions of an object in 3d space, and ultimately onto the 2d canvas area.    1 fragment shader, which describes how to colour each pixel-sized fragment of the final 2d geometry. Because objects can overlap, we will often draw several fragments on top of each other before deciding the colour of the pixel. source [ antongerdelan.net ]

Clever Shader Tricks - BY AMD Developer Central

Shader scripts used for all rendering. Most of the advanced rendering is controlled via Material class. Shader class is mostly used just to check whether a shader can run on the user's hardware ( isSupported property) and to find shaders by name ( Find method). download this book from amd developer central  pdf free book!