Closed joondong closed 4 years ago
At 0~1 sec, camera shakes but not background. https://www.youtube.com/watch?v=94wq_2ohrRU&feature=youtu.be
@tdmowrer My bad, I uploaded new one
You can override the material (with a custom shader) instead of directly modifying the one in the package. See my comment here: https://github.com/Unity-Technologies/arfoundation-samples/issues/620#issuecomment-705027617
That video seems to have been removed, but if you want the background texture to shake, try adding a small random offset to the gl_Vertex
in the shader, around this line:
// Transform the position from object space to clip space.
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@tdmowrer Thanks for your help!!!!! I made it! https://www.youtube.com/watch?v=iXWl5f_iW7k
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
You can override the material (with a custom shader) instead of directly modifying the one in the package. See my comment here: #620 (comment)
That video seems to have been removed, but if you want the background texture to shake, try adding a small random offset to the
gl_Vertex
in the shader, around this line:// Transform the position from object space to clip space. gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
Hello, I want to modify the color to make the AR scene look darker, which parameter to change, thank you
You'd need to change the gl_FragColor
in the fragment shader.
How to change background shader? I am trying to apply some filter to background of camera streaming. Kind of color filtering. However, whenever I changed Library/PackageCache/com.unity.xr.core@4.0.8/Assets/Shaders/ARCoreBackground.shader it returns to original code.
Can I modify the shader?
How to shake background texture? What I am trying to make is "Camera shake" which is used for bomb explosion. In my AR apps, I need to shake background as well because shaking just rendering camera looks weird.
How to shake background texture for this work?