forked from mttu-developers/konabot
尝试 gl backend
This commit is contained in:
@ -18,8 +18,8 @@ from dataclasses import dataclass
|
||||
import re
|
||||
import numpy as np
|
||||
from dataclasses import dataclass
|
||||
from konabot.plugins.marchtoy.obj import Object, Camera, OBJECT_ENTRIES
|
||||
from konabot.plugins.marchtoy.op import OPERATION_ENTRIES
|
||||
from obj import Object, Camera, OBJECT_ENTRIES
|
||||
from op import OPERATION_ENTRIES
|
||||
from typing import Optional
|
||||
|
||||
@dataclass
|
||||
@ -113,8 +113,8 @@ class Scene:
|
||||
def __str__(self) -> str:
|
||||
return ", ".join([str(type(obj)) for obj in self.canvas_objs])
|
||||
|
||||
def compile(self) -> str:
|
||||
PATH = pathlib.Path(__file__).parent / "shaders" / "raymarch.sksl"
|
||||
def compile(self, fs_src: str = "frag.glsl") -> str:
|
||||
PATH = pathlib.Path(__file__).parent / "shaders" / fs_src
|
||||
with PATH.open(encoding="utf-8") as f:
|
||||
content = f.read()
|
||||
sdf_block: str = ""
|
||||
|
||||
Reference in New Issue
Block a user