Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Feb 06, 2018 at 06:14 PM by Oruji for the following reason:

I found the problem.

One of the noises is more or less static and due to different initial sampling points, we get varying results.

avatar image
0
Question by Oruji · Feb 06, 2018 at 09:34 PM · shadershader programmingshaderlab

Vertex Noise Shader Mismatch on Different Computers

We have a fragment shader with three noises. It produces the results we are after when we tweak it on one computer, but the same parameters behave differently on another computer. We cannot figure out why the results differ. The mismatch is quite big. The noise is about 100% stronger on one computer.

What in the shader could be causing this discrepancy? The scenes are near identical.

Any input is appreciated. Thanks.

 v2f vert(appdata_t v)
 {
     v2f o;
     o.vertex = UnityObjectToClipPos(v.vertex);

     float4 worldPos = mul (unity_ObjectToWorld, v.vertex);

     float noise_a  =  _NoiseAAmount *  snoise(worldPos.xy * _NoiseAFrequency + float2(_Time.x * _NoiseATimeScale, 0));
     float noise_b  =  _NoiseBAmount *  snoise(worldPos.xy * _NoiseBFrequency + float2(_Time.x * _NoiseBTimeScale, 0));
     float noise_c =    _NoiseCAmount*clamp(snoise(worldPos.xy * _NoiseCFrequency + float2(_Time.x * _NoiseCTimeScale, 0) ), 0, 0.75);

     noise_a = (noise_c) * noise_a;
     noise_b = noise_b*(noise_a/_NoiseC);
     o.vertex.x += noise_a + noise_b;

     o.color = v.color;
     o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
     return o;
 }`

`

Snoise:

edit (removed code for snoise, added link)

SimplexNoise2D.hlsl

Comment
Add comment · Show 5
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Oruji · Feb 06, 2018 at 04:07 PM 0
Share

snoise is from SimplexNoise2D.hlsl

avatar image Bunny83 Oruji · Feb 06, 2018 at 04:20 PM 0
Share

You know that you can link external sources? Also when copying licensed code you have to include the license information. The code is under an $$anonymous$$IT license. It's now allowed to redistribute it without the copyright and license information. I removed the code from your question and added a link to the repository which seems to be the source. If it's not the source, feel free to edit your question. However you should only include relevant information

avatar image Oruji Bunny83 · Feb 06, 2018 at 05:08 PM 0
Share

You are right, I apologize.

avatar image Bunny83 · Feb 06, 2018 at 04:23 PM 0
Share

Uhm, the noise depends on the worldspace positions of the vertices. So if you have the exact same object at the exact same position, rotation and scale and using the exact same parameters for the material you should get the same output. However if the object is only moved or rotated slightly the result might look completely different. You may want to include a screen shot or a short video of the two different results.

avatar image Oruji Bunny83 · Feb 06, 2018 at 05:12 PM 0
Share

All objects have the exact same position, rotation and parameters.

$$anonymous$$y only lead is that a difference in fps may produce different results.

0 Replies

  • Sort: 

Follow this Question

Answers Answers and Comments

121 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Help with a see-through shader 0 Answers

How to manipulate a shader's alpha channel while using a texture? 1 Answer

shadertoy to unity,Shadertoy to unity 0 Answers

Shader - What is float3.xy? 1 Answer

How to Fade out Custom Unity Shader ? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges