Commit Graph

20 Commits

Author SHA1 Message Date
Ivan Avdeev
202f2b8462 rt: print material load stats 2022-08-13 14:17:43 -07:00
NightFox
91df117998
new material paths (#382) 2022-08-12 10:27:41 -07:00
Ivan Avdeev
85c55a7fc9 update after merge, make it build and run with rasterizer
have not checked ray tracing, or playing longer than a couple of minutes
2022-08-08 00:23:38 -07:00
Ivan Avdeev
c39e0c6031 rtx: add include support for materials
use it like this:
```materials.mat
{
	"include" "other.mat"
	"include" "another.mat"
	// ...
}

// continue with regular material definitions
```

```other.mat
{
	// can also nest includes (up to 4)
	"include" "yetanother.mat"
}

// continue with definitions as usual

{
	// may also have includes later too
	"include" "whatever.mat"
}

// ...
```

etc

fixes #312
2021-12-23 22:25:31 -08:00
Ivan Avdeev
7e90b07288 rtx: create new pbr materials using "new" key
fixes #291
2021-12-22 12:33:33 -08:00
Ivan Avdeev
86b13716bf rtx: create new materials referenceable by "for" key, #291 2021-12-22 12:33:33 -08:00
Ivan Avdeev
f02e0a8b3a rtx: enable referencing by short tex name in patch, #291 2021-12-22 12:33:33 -08:00
Ivan Avdeev
a94674b11a rtx: allow creating new pbr materials 2021-12-22 12:33:33 -08:00
NightFox
fcb56ccb45 Update vk_materials.c 2021-12-01 19:14:40 -08:00
NightFox
b517205269 Add new locations for materials.mat
pbr/sprites/materials.mat
pbr/gfx/env/materials.mat
2021-12-01 19:14:40 -08:00
Ivan Avdeev
f70f5bfe82 rtx: add scalar parameters for material overrides, fix #238 2021-12-01 13:19:01 -08:00
Ivan Avdeev
28d047a904 rtx: enable patching surface textures
example:
```
{
	"_xvk_surface_id" "489"
	"_xvk_texture" "#maps/test_material.bsp:debug_normal1.mip"
}
```

if _xvk_texture is empty, then the surface will be deleted

surfaces can be deleted or their
2021-11-26 23:59:48 -08:00
Ivan 'provod' Avdeev
f0aaa3cd10 materials: enable force-reloading textures
mark such materials as `"force_reload" "1"`
2021-11-25 14:38:03 -08:00
Ivan 'provod' Avdeev
1624f4620a mat: load materials from multiple sources; abs paths
- look for materials in:
  - pbr/materials.mat
  - pbr/models/materials.mat
  - pbr/wadname.wad/materials.mat
  - pbr/maps/mapname.bsp/materials.mat

- all paths are relative to their materials.mat, except for ones that begin with '/', which are relative to `pbr` dir

pbr dir should be placed in modname dir, e.g. 'valve'

#155
2021-11-25 13:51:39 -08:00
Ivan Avdeev
10dab2f021 fix materials application to studio models, fix #216
1. make sure that it can find studio textures by name exactly (no wad or
   other weird prefixes necessary)
2. do not apply HACK_reflective to chrome that already has a patched
   material
2021-11-19 11:46:44 -08:00
Ivan Avdeev
430d56af5f rtx: enable partial texture overrides in materials 2021-11-17 11:11:34 -08:00
Ivan Avdeev
6df830dd0a add initial normalmaps support 2021-11-17 09:43:10 -08:00
Ivan Avdeev
311e6214c8 fix linux build 2021-11-16 09:34:36 -08:00
Ivan 'provod' Avdeev
bd4de6128c rtx: add metalness and roughness map support
overrides existing textures. loads override data from pbr/materials.map
2021-11-16 09:34:36 -08:00
Ivan 'provod' Avdeev
e8359b12e8 rtx: add material support stub 2021-11-16 09:34:36 -08:00