-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Operation Warp speed , NOA ENGINE give me my christmas present before 2021 #139
Comments
heres the shader code Shader "Minecraft/Blocks" {
} |
other chader code : Shader "Minecraft/Transparent Blocks" {
} |
Or maybe something like this? Pretty sure MC uses GLSL shader code so it would be pretty easy. https://github.com/saaratrix/glsl-babylonshader |
This is also seems really useful: |
Thank lol check it out |
I dont think you should try to use shaders to acomplish this. Something like https://doc.babylonjs.com/divingDeeper/lights/shadows will make it easier |
Can you make a black shader then , global illumination is in the bag , the black color will be controlled by a float inside the game , send me the code I'll try to help |
Here's were I got the info on wath kind of shader we need https://www.youtube.com/watch?v=u85U0wVkN0Y&list=PLVsTSlfj0qsWEJ-5eMtXsYp03Y9yF1dEn&index=16 |
As I said, I'm not very experienced with Shader Code. However, I can try |
Ok, BABYLON.Effect.ShadersStore["customVertexShader"] = "precision highp float;\r\n" +
"// Attributes\r\n" +
"attribute vec3 position;\r\n" +
"attribute vec2 uv;\r\n" +
"// Uniforms\r\n" +
"uniform mat4 worldViewProjection;\r\n" +
"// Varying\r\n" +
"varying vec2 vUV;\r\n" +
"void main(void) {\r\n" +
" gl_Position = worldViewProjection * vec4(position, 1.0);\r\n" +
" vUV = uv;\r\n" +
"}\r\n";
BABYLON.Effect.ShadersStore["customFragmentShader"] = "precision highp float;\r\n" +
"varying vec2 vUV;\r\n" +
"uniform sampler2D textureSampler;\r\n" +
"void main(void) {\r\n" +
" gl_FragColor = vec4(0,0,0, 1.0);\r\n" +
"}\r\n";
// Compile
var shaderMaterial = new BABYLON.ShaderMaterial("shader", scene, {
vertex: "custom",
fragment: "custom",
}, {
attributes: ["position", "normal", "uv"],
uniforms: ["world", "worldView", "worldViewProjection", "view", "projection"]
});
shaderMaterial.setFloat("time", 0);
shaderMaterial.setVector3("cameraPosition", BABYLON.Vector3.Zero());
shaderMaterial.backFaceCulling = false;
var meshes = noa.rendering.getScene().meshes;
for (var index = 0; index < meshes.length; index++) {
var mesh = meshes[index];
mesh.material = shaderMaterial;
} try typing that in console of your game |
Thank you , Im in Canada it's 2 am have to sleep now , thank you for the first step :) |
Operation warp speed underway lol |
Hi Ghost ;) |
Guys all users of Noa Engine , WE NEED cave shadows !!!!!!!!!!!!
as per this youtube channel https://www.youtube.com/watch?v=aY3yP3T1vzU&list=PLVsTSlfj0qsWEJ-5eMtXsYp03Y9yF1dEn&index=15
we need SHADER not a light , guys I dont know how to make a shader in babylonjs , Noa community please unite and tackle this challenge before 2021 , can someone help me with a light SHADER . NOA community lets unite .
The text was updated successfully, but these errors were encountered: