Simply Lit

From Unify Community Wiki
(Difference between revisions)
Jump to: navigation, search
(New page: Author: Jessy ==Description== This is a very basic shader. It just blends your texture map with Ambient and Diffuse lighting. There are three versions, which clamp the brightness of th...)
 
(Description)
Line 3: Line 3:
 
==Description==
 
==Description==
  
This is a very basic shader.  It just blends your texture map with Ambient and Diffuse lighting.  There are three versions, which clamp the brightness of the texture at 1x, 2x, or 4x brightness, no matter how intense the lights shine on them.
+
This is a very basic shader.  It just blends your texture map with Ambient and Diffuse vertex lighting.  There are three versions, which clamp the brightness of the texture at either 1x, 2x, or 4x brightness, no matter how intense the lighting gets.
  
 
==Usage==
 
==Usage==

Revision as of 20:36, 12 November 2009

Author: Jessy

Description

This is a very basic shader. It just blends your texture map with Ambient and Diffuse vertex lighting. There are three versions, which clamp the brightness of the texture at either 1x, 2x, or 4x brightness, no matter how intense the lighting gets.

Usage

Drag a single texture onto the material's only variable slot. Adjust the "Ambient Light" to taste, in Unity's Render Settings, and apply any other lighting you like.


Click here for a zip file that includes these three shaders.

ShaderLab - Texture Only.shader

<shaderlab>Shader "Simply Lit" {


Properties { _MainTex ("Base (RGB)", 2D) = "" }

SubShader { Lighting On

Material { Ambient (2,2,2) Diffuse (1,1,1) }

Pass { SetTexture [_MainTex] { combine texture * primary } } }

}</shaderlab>

Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox