feat: add grid material
This commit is contained in:
4
Makefile
4
Makefile
@@ -26,10 +26,14 @@ materials: FORCE
|
|||||||
$(FILAMENT_PATH)/resgen -c -p image -x thermion_dart/native/include/material/ materials/image.filamat
|
$(FILAMENT_PATH)/resgen -c -p image -x thermion_dart/native/include/material/ materials/image.filamat
|
||||||
$(FILAMENT_PATH)/matc -a opengl -a metal -o materials/gizmo.filamat materials/gizmo.mat
|
$(FILAMENT_PATH)/matc -a opengl -a metal -o materials/gizmo.filamat materials/gizmo.mat
|
||||||
$(FILAMENT_PATH)/resgen -c -p gizmo -x thermion_dart/native/include/material/ materials/gizmo.filamat
|
$(FILAMENT_PATH)/resgen -c -p gizmo -x thermion_dart/native/include/material/ materials/gizmo.filamat
|
||||||
|
${FILAMENT_PATH}/matc -a opengl -a metal -o materials/grid.filamat materials/grid.mat
|
||||||
|
$(FILAMENT_PATH)/resgen -c -p grid -x thermion_dart/native/include/material/ materials/grid.filamat
|
||||||
echo '#include "gizmo.h"' | cat - thermion_dart/native/include/material/gizmo.c > thermion_dart/native/include/material/gizmo.c.new
|
echo '#include "gizmo.h"' | cat - thermion_dart/native/include/material/gizmo.c > thermion_dart/native/include/material/gizmo.c.new
|
||||||
echo '#include "image.h"' | cat - thermion_dart/native/include/material/image.c > thermion_dart/native/include/material/image.c.new
|
echo '#include "image.h"' | cat - thermion_dart/native/include/material/image.c > thermion_dart/native/include/material/image.c.new
|
||||||
|
echo '#include "grid.h"' | cat - thermion_dart/native/include/material/grid.c > thermion_dart/native/include/material/grid.c.new
|
||||||
mv thermion_dart/native/include/material/image.c.new thermion_dart/native/include/material/image.c
|
mv thermion_dart/native/include/material/image.c.new thermion_dart/native/include/material/image.c
|
||||||
mv thermion_dart/native/include/material/gizmo.c.new thermion_dart/native/include/material/gizmo.c
|
mv thermion_dart/native/include/material/gizmo.c.new thermion_dart/native/include/material/gizmo.c
|
||||||
|
mv thermion_dart/native/include/material/grid.c.new thermion_dart/native/include/material/grid.c
|
||||||
|
|
||||||
#rm materials/*.filamat
|
#rm materials/*.filamat
|
||||||
|
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ void main(List<String> args) async {
|
|||||||
sources.addAll([
|
sources.addAll([
|
||||||
"${config.packageRoot.toFilePath()}/native/include/material/gizmo.c",
|
"${config.packageRoot.toFilePath()}/native/include/material/gizmo.c",
|
||||||
"${config.packageRoot.toFilePath()}/native/include/material/image.c",
|
"${config.packageRoot.toFilePath()}/native/include/material/image.c",
|
||||||
|
"${config.packageRoot.toFilePath()}/native/include/material/grid.c",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
var libs = [
|
var libs = [
|
||||||
@@ -76,7 +77,6 @@ void main(List<String> args) async {
|
|||||||
"image",
|
"image",
|
||||||
"imageio",
|
"imageio",
|
||||||
"tinyexr",
|
"tinyexr",
|
||||||
"gltfio_core",
|
|
||||||
"filaflat",
|
"filaflat",
|
||||||
"dracodec",
|
"dracodec",
|
||||||
"ibl",
|
"ibl",
|
||||||
|
|||||||
12
thermion_dart/native/include/material/grid.S
Normal file
12
thermion_dart/native/include/material/grid.S
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
.global GRID_GRID_OFFSET;
|
||||||
|
.global GRID_GRID_SIZE;
|
||||||
|
|
||||||
|
.global GRID_PACKAGE
|
||||||
|
.section .rodata
|
||||||
|
GRID_PACKAGE:
|
||||||
|
.incbin "grid.bin"
|
||||||
|
GRID_GRID_OFFSET:
|
||||||
|
.int 0
|
||||||
|
GRID_GRID_SIZE:
|
||||||
|
.int 30210
|
||||||
|
|
||||||
12
thermion_dart/native/include/material/grid.apple.S
Normal file
12
thermion_dart/native/include/material/grid.apple.S
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
.global _GRID_GRID_OFFSET;
|
||||||
|
.global _GRID_GRID_SIZE;
|
||||||
|
|
||||||
|
.global _GRID_PACKAGE
|
||||||
|
.section __TEXT,__const
|
||||||
|
_GRID_PACKAGE:
|
||||||
|
.incbin "grid.bin"
|
||||||
|
_GRID_GRID_OFFSET:
|
||||||
|
.int 0
|
||||||
|
_GRID_GRID_SIZE:
|
||||||
|
.int 30210
|
||||||
|
|
||||||
BIN
thermion_dart/native/include/material/grid.bin
Normal file
BIN
thermion_dart/native/include/material/grid.bin
Normal file
Binary file not shown.
1521
thermion_dart/native/include/material/grid.c
Normal file
1521
thermion_dart/native/include/material/grid.c
Normal file
File diff suppressed because it is too large
Load Diff
13
thermion_dart/native/include/material/grid.h
Normal file
13
thermion_dart/native/include/material/grid.h
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
#ifndef GRID_H_
|
||||||
|
#define GRID_H_
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
extern const uint8_t GRID_PACKAGE[];
|
||||||
|
extern int GRID_GRID_OFFSET;
|
||||||
|
extern int GRID_GRID_SIZE;
|
||||||
|
}
|
||||||
|
#define GRID_GRID_DATA (GRID_PACKAGE + GRID_GRID_OFFSET)
|
||||||
|
|
||||||
|
#endif
|
||||||
Reference in New Issue
Block a user