Implementing a Texture

From LuxCoreRender Wiki
Revision as of 14:05, 18 June 2018 by Byob (talk | contribs) (Created page with "== C++ Code == Files that need to be created: * Header: include/slg/textures/yourtexturename.h * Source: src/slg/textures/yourtexturename.cpp Files that need to be edited: *...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

C++ Code

Files that need to be created:

  • Header: include/slg/textures/yourtexturename.h
  • Source: src/slg/textures/yourtexturename.cpp

Files that need to be edited:

  • Base texture header: include/slg/textures/texture.h
  • Sceneparse: src/slg/scene/parsetextures.cpp
  • CMakeLists.txt: src/slg/CMakeLists.txt

Commit with example: adding the "Divide" texture: https://github.com/LuxCoreRender/LuxCore/commit/ce6e23c244b1bb426c1dcd13099a41982e565b88

Modifying the base texture header

TODO

Modifying Sceneparse

TODO

Modifying CMakeLists.txt

TODO

Compile and Test

To test your plugin, compile LuxCore: Compiling_LuxCore

After the compilation succeeds, you will need a scene to test your plugin. The easiest method is to edit one of the .scn files in the scenes/luxball directory.

TODO Example

Now, run luxcoreui from the root LuxCore directory with

./bin/luxcoreui ./scenes/luxball/luxball-sunset.cfg

TODO result example image

OpenCL Code

TODO