Shadertoy.com test

Developer
Size
2,371 Kb
Views
26,312

How do I make an shadertoy.com test?

Original from shadertoy.com. What is a shadertoy.com test? How do you make a shadertoy.com test? This script and codes were developed by Khangeldy on 09 November 2022, Wednesday.

Shadertoy.com test Previews

Shadertoy.com test - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>shadertoy.com test</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <script id="vertex-shader" type="no-js">	void main()	{	gl_Position = vec4( position, 1.0 );	}
</script>
<script id="fragment-shader" type="no-js">	uniform float iGlobalTime;	uniform vec2 iResolution;	void main()
{	vec2 p = -1.0 + 2.0 * gl_FragCoord.xy / iResolution.xy;	float x = p.x;	float y = p.y;	float mov0 = x+y+cos(sin(iGlobalTime)*2.0)*100.+sin(x/100.)*1000.;	float mov1 = y / 0.9 + iGlobalTime;	float mov2 = x / 0.2;	float c1 = abs(sin(mov1+iGlobalTime)/2.+mov2/2.-mov1-mov2+iGlobalTime);	float c2 = abs(sin(c1+sin(mov0/1000.+iGlobalTime)+sin(y/40.+iGlobalTime)+sin((x+y)/100.)*3.));	float c3 = abs(sin(c2+cos(mov1+mov2+c2)+cos(mov2)+sin(x/1000.)));	gl_FragColor = vec4(c1,c2,c3,1);
}
</script> <script src='http://cdnjs.cloudflare.com/ajax/libs/three.js/r70/three.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Shadertoy.com test - Script Codes CSS Codes

body {	margin: 0;	overflow: hidden;	height: 100%;
}

Shadertoy.com test - Script Codes JS Codes

var scene, camera, renderer;
scene = new THREE.Scene();
var fov = 75,	aspect = window.innerWidth / window.innerHeight;
camera = new THREE.PerspectiveCamera(fov, aspect, 0.1, 1000);
camera.position.z = 100;
camera.lookAt(scene.position);
renderer = new THREE.WebGLRenderer();
renderer.setClearColor(0xc4c4c4);
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);
var clock = new THREE.Clock();
var tuniform = {	iGlobalTime: {	type: 'f',	value: 0.1	},	iResolution: {	type: 'v2',	value: new THREE.Vector2()	}
};
tuniform.iResolution.value.x = window.innerWidth;
tuniform.iResolution.value.y = window.innerHeight;
var material = new THREE.ShaderMaterial({	uniforms: tuniform,	vertexShader: document.getElementById('vertex-shader').textContent,	fragmentShader: document.getElementById('fragment-shader').textContent
});
var mesh = new THREE.Mesh(	new THREE.PlaneGeometry(40, 40, 40), material
);
scene.add(mesh);
function render(time) {	tuniform.iGlobalTime.value += clock.getDelta();	requestAnimationFrame(render);	renderer.render(scene, camera);
}
render();
Shadertoy.com test - Script Codes
Shadertoy.com test - Script Codes
Home Page Home
Developer Khangeldy
Username Khangeldy
Uploaded November 09, 2022
Rating 3
Size 2,371 Kb
Views 26,312
Do you need developer help for Shadertoy.com test?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Khangeldy (Khangeldy) Script Codes
Create amazing art & images with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!