Added fog on the main scene
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
public class CosmosSkyEditor : ShaderGUI {
|
||||
public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties)
|
||||
{
|
||||
Material targetMat = materialEditor.target as Material;
|
||||
bool animationEnabled = false;
|
||||
for (int i = 0; i < properties.Length; i++)
|
||||
{
|
||||
if(properties[i].name == "_AnimOn"){
|
||||
animationEnabled = properties[i].floatValue > 0.5f;
|
||||
}
|
||||
if(!animationEnabled){
|
||||
string propName = properties[i].name;
|
||||
if (propName == "_D1Distort") continue;
|
||||
if (propName == "_D1Speed") continue;
|
||||
if (propName == "_D2Distort") continue;
|
||||
if (propName == "_D2Speed") continue;
|
||||
}
|
||||
materialEditor.ShaderProperty(properties[i], properties[i].displayName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 35a1f463d7351ee46b32c9d8edee8e8c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 155006
|
||||
packageName: Animated Cosmos Shader
|
||||
packageVersion: 1.1
|
||||
assetPath: Assets/AnimatedCosmos/Shaders/Editor/CosmosSkyEditor.cs
|
||||
uploadId: 580778
|
||||
Reference in New Issue
Block a user