Skip to content

Sobel Shader as a Effect #393

Closed
Closed

Description

@optimus007

Is your feature request related to a problem?

Refereing to ths kalidoscope example i managed to get sobel added as a pass.
It works great but i have no blend options and cannot add it into the effect pass stack.

Describe the solution you'd like

Convert Sobel operator shader into an internal effect and maybe add controls to tweak the output (color , strength ,etc)

Additional context

three example https://threejs.org/examples/?q=sobel#webgl_postprocessing_sobel
three file https://github.com/mrdoob/three.js/blob/master/examples/jsm/shaders/SobelOperatorShader.js

Code I used to add Sobel Shader as a shader pass

	const shaderMaterial = new ShaderMaterial(SobelOperatorShader)
	const shaderPass = new ShaderPass(shaderMaterial, "tDiffuse")
	shaderMaterial.uniforms.resolution.value.x = window.innerWidth
	shaderMaterial.uniforms.resolution.value.y = window.innerHeight
	composer.addPass(shaderPass)

BTW Awesome work with the library !

Activity

  1. vanruesc commented on Aug 31, 2022

    @vanruesc
    Member

    Sorry for the late reply!

    I'd like to add Sobel at some point, but I'm currently too busy with other issues.

  2. CodyJasonBennett commented on Apr 28, 2023

    @CodyJasonBennett
    Contributor

    Shared this in Discord for a question, but this is a straight ahead port -- https://codesandbox.io/s/sobel-effect-postprocessing-meyq7m. This doesn't look optimized at all though. I can try my hand at a pass specifically for postprocessing if there's a need.

  3. vanruesc commented on Aug 21, 2025

    @vanruesc
    Member

    Superceded by #583.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions