Jump to content

Search the Community

Showing results for tags 'customproceduraltexture'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. Hi all, I want to create a Sprite2D and it's image can make some effect like grayscale. So I consider using CustomProceduralTexture to implement it. My pseudo code is like below (the shader is just basic one not grayscale): let sampleTexture = new BABYLON.Texture("img/sample.png", scene, true, false, BABYLON.Texture.NEAREST_SAMPLINGMODE); BABYLON.Effect.ShadersStore["TestPixelShader"] = "precision highp float;\n" + "varying vec2 vUV;\n" + "uniform sampler2D sampleTexture;\n" + "void main(void) {\n" + "gl_FragColor = texture2D(sampleTexture, vUV);\n" + "}\n"; let procedualTexture = new BABYLON.CustomProceduralTexture("custom", "Test", 1024, scene); procedualTexture.setTexture("sampleTexture", sampleTexture); let sprite2d = new BABYLON.Sprite2D(procedualTexture, { options... }); Is my idea workable? Or do I need using another ways to implement it? Thanks!
×
×
  • Create New...