This is Mewa's official logo, shaped like an M.

Mewa Web Store

Become a publisher

BlackAndWhite

by Mewatools

Converts an image into Black and White using an arithmetic average of the 3 color channels. The output contains the same black and white image in the 4 channels.

Script
// "BlackAndWhite" by Mewatools <hugo@mewatools.com> is licensed under CC BY 4.0 // "HexPixelate" by Mewatools <hugo@mewatools.com> is licensed under CC BY 4.0 // Adapted from original shader : https://www.shadertoy.com/view/wsSyWR function HexPixelate( nodegraph ) { shaderSource = " vec2 hexagon(vec2 uv) { uv *= vec2(0.577350278, 1.0); // hexagonal ratio float z = clamp(abs(mod(uv.x+floor(uv.y), 2.0)-1.0)*3.141592653-1.047197551, 0.0, 1.0); uv.y = floor(uv.y + z); uv.x = (floor(uv.x*0.5 + mod(uv.y, 2.0)*0.5) - mod(uv.y, 2.0)*0.5 + 0.5)*3.464101665; // convert back from hexagonal ratio return uv; } void mainImage(out vec4 fragColor, in vec2 texCoord) { vec4 tex = texture2D(iChannel0, hexagon(texCoord * pixelCount)/pixelCount); fragColor = vec4(tex.rgb, 1.0); }"; node = nodegraph.addShaderNode( shaderSource, "HexPixelate" ); // Brief: Pixelates using an hexagonal pattern node.addShaderInput("iChannel0"); uiControl = node.addFloatControl("pixelCount", 120); uiControl.setName("Pixels"); uiControl.setStep(0.1); uiControl.setRange(3, 1024); node.setReady(); }
File Details
  • File Name: BlackAndWhite.mw
  • Last Update: April 27th, 2021
  • Extends: Nodegraph
CC BY