Jump to content

How to apply show diffuse texture with PBR?


Alex10
 Share

Recommended Posts

Сan be assigned to show diffuse texture to the model if it is to apply PBR?
I founded in the documentation, only examples of pre-set: metal, plastic, glass and wood.


For example:

var scene = new BABYLON.Scene(engine);
var camera = new BABYLON.ArcRotateCamera("Camera", -Math.PI / 4, Math.PI / 2.5, 200, 

var hdrTexture = new BABYLON.HDRCubeTexture("textures/room.hdr", scene, 512);

var hdrSkybox = BABYLON.Mesh.CreateBox("hdrSkyBox", 1000.0, scene);
var hdrSkyboxMaterial = new BABYLON.PBRMaterial("skyBox", scene);
hdrSkyboxMaterial.reflectionTexture = hdrTexture.clone();
hdrSkyboxMaterial.disableLighting = true;
hdrSkybox.material = hdrSkyboxMaterial;

material = glass;
glass.refractionTexture = hdrTexture;
glass.reflectionTexture = hdrTexture;

????  material.diffuseTexture  = new BABYLON.Texture("/path", scene);

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...