How to implement a simple GLSL Shader in Three.js?

Поделиться
HTML-код
  • Опубликовано: 5 сен 2024

Комментарии • 14

  • @facileprinceps4687
    @facileprinceps4687 Год назад +1

    OMG, you made my day! Can't thank you enought! Excellent tutorial (:

  • @leamon9024
    @leamon9024 3 года назад +2

    Hi, thanks for this tutorial. I would like to know more detailed explanation about shaders. 😃

  • @moathahmed2360
    @moathahmed2360 2 года назад

    yes i need more of shader in three js

  • @deepak8586
    @deepak8586 2 года назад +1

    great content!!

  • @knightcube
    @knightcube  3 года назад +2

    In this video, I show you how to implement a simple GLSL shader in Three.js. We use a ShaderMaterial instead of a MeshBasicMaterial to render a cube in Three.js. Shaders let you customize the look of your 3D objects by altering the geometry using Vertex shaders, showing gradients on your mesh using Fragment Shaders and much more.
    🛑 This video is NOT an introduction to shaders.

    • @knightcube
      @knightcube  3 года назад

      @Z3U5 Actually I was trying it out yesterday. The installation step itself was so complicated man.

    • @graemegillies1683
      @graemegillies1683 3 года назад +2

      Good Job Mate! a basic intro to shaders would be good, an explanation of the syntax and what it does,, for someone who doesn't know "C/C++ .

  • @MANGUNICREATIVE
    @MANGUNICREATIVE 3 года назад

    Hi Rajat, what is best in performance between three.js and babylon.js
    Three.js using WebGL and Babylon.js using WebGPU

  • @alonsovalls4633
    @alonsovalls4633 2 года назад

    Would this be possible using express.js? i've tried and its not working, just gives me this error : Failed to vertex.glsl:1 load module script: Expected a JavaScript module script but the server responded with a MIME type of "application/octet-stream". Strict MIME type checking is enforced for module scripts per HTML spec.

  • @mr.a2323
    @mr.a2323 2 года назад +1

    Is there any way for the shaders code to have syntax highlighter? ...it's horrible having to look at this colorless string

    • @knightcube
      @knightcube  2 года назад +1

      I was looking for the same thing when I was making this tutorial but couldn't find anything.

    • @mr.a2323
      @mr.a2323 2 года назад

      I found out a great vscode extension for that. My eyes were grateful.
      "Comment tagged templates" from Matt Bierner.