0
À l'étude

move textures for mobile problem

Ivan Ostanin il y a 10 ans mis à jour il y a 10 ans 4
Image 329

version 1.03
what should I do?
Why does this happen?
animation through node panner
À l'étude
Good question. Looks like the time variable is losing precision, either because the number is too large or too small.
You might need to push in a time variable yourself using myMaterial.SetFloat()
where in the code do I do this?
In the update loop might do. myMaterial.SetFloat("_MyTimeProperty", Time.time);
I do not understand the code,
asked for help from the programmer,
He said that there is no variable in the shader from your code myMaterial.SetFloat ("_ MyTimeProperty", Time.time);
that would appeal to her
I tried to just get up there code
errors appear
// Shader created with Shader Forge v1.03
// Shader Forge (c) Neat Corporation / Joachim Holmer - http://www.acegikmo.com/shaderforge/
// Note: Manually altering this data may prevent you from opening it in Shader Forge
/*SF_DATA;ver:1.03;sub:START;pass:START;ps:flbk:,lico:1,lgpr:1,nrmq:1,limd:1,uamb:True,mssp:True,lmpd:False,lprd:False,rprd:False,enco:False,frtr:True,vitr:True,dbil:False,rmgx:True,rpth:0,hqsc:True,hqlp:False,tesm:0,blpr:0,bsrc:0,bdst:1,culm:0,dpts:2,wrdp:True,dith:2,ufog:True,aust:True,igpj:False,qofs:0,qpre:1,rntp:1,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,ofsf:0,ofsu:0,f2p0:False;n:type:ShaderForge.SFN_Final,id:5564,x:33144,y:32664,varname:node_5564,prsc:2|emission-9623-RGB;n:type:ShaderForge.SFN_Tex2d,id:9623,x:32734,y:32653,ptovrint:False,ptlb:node_9623,ptin:_node_9623,varname:_node_9623,prsc:2,tex:28c7aad1372ff114b90d330f8a2dd938,ntxv:0,isnm:False|UVIN-4014-UVOUT;n:type:ShaderForge.SFN_Panner,id:4014,x:32551,y:32760,varname:node_4014,prsc:2,spu:0.5,spv:0.5;proporder:9623;pass:END;sub:END;*/


Shader "Shader Forge/NewShader1" {
Properties {
_node_9623 ("node_9623", 2D) = "white" {}
}
SubShader {
Tags {
"RenderType"="Opaque"
}
Pass {
Name "ForwardBase"
Tags {
"LightMode"="ForwardBase"
}




CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#define UNITY_PASS_FORWARDBASE
#include "UnityCG.cginc"
#pragma multi_compile_fwdbase_fullshadows
#pragma exclude_renderers xbox360 ps3 flash d3d11_9x
#pragma target 3.0
uniform float4 _TimeEditor;
uniform sampler2D _node_9623; uniform float4 _node_9623_ST;
struct VertexInput {
float4 vertex : POSITION;
float2 texcoord0 : TEXCOORD0;
};
struct VertexOutput {
float4 pos : SV_POSITION;
float2 uv0 : TEXCOORD0;
};
VertexOutput vert (VertexInput v) {
VertexOutput o = (VertexOutput)0;
o.uv0 = v.texcoord0;
o.pos = mul(UNITY_MATRIX_MVP, v.vertex);
return o;
}
fixed4 frag(VertexOutput i) : COLOR {
/////// Vectors:
////// Lighting:
////// Emissive:
float4 node_2042 = _Time + _TimeEditor;
float2 node_4014 = (i.uv0+node_2042.g*float2(0.5,0.5));
float4 _node_9623_var = tex2D(_node_9623,TRANSFORM_TEX(node_4014, _node_9623));
float3 emissive = _node_9623_var.rgb;
float3 finalColor = emissive;
return fixed4(finalColor,1);
}
ENDCG
}
}
FallBack "Diffuse"
CustomEditor "ShaderForgeMaterialInspector"
}