Сообщение от FDsagizi
Это шейдеры ??? чорт не верю! Это описание материалов!!!
Скажете сударь! Но они будут в итоге шейдерами - да ? А я вас прошу и на айподе второй генерации ????
|
Называю так, как
это называет разработчик Unity
Shaders in Unity are written in a language called ShaderLab, which is similar to Microsoft's .FX files or NVIDIA's CgFX. Vertex & pixel shaders for the GPU are written in standard Cg/HLSL programming language. If you want to write your own shaders, including custom vertex & fragment programs, this section and the ShaderLab reference will explain how. So there are three components to writing shaders in Unity:
|
То что я не привел примеров - извиняюсь.
Вот диффузный шейдер, стандартный в юнити с использованием сурфейсоной системы:
Shader "Diffuse" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader {
Tags { "RenderType"="Opaque" }
LOD 200
CGPROGRAM
#pragma surface surf Lambert
sampler2D _MainTex;
float4 _Color;
struct Input {
float2 uv_MainTex;
};
void surf (Input IN, inout SurfaceOutput o) {
half4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
o.Albedo = c.rgb;
o.Alpha = c.a;
}
ENDCG
}
Fallback "VertexLit"
}
Данный шейдер компилируется для всех платформ включая XBOX 360, PS3 и OpenGL ES 2 для поддержки на iPhone и Android.
Хоть бы дочитал до конца