Commit Graph

1875 Commits

Author SHA1 Message Date
Ivan Avdeev
18056700cf disable that SARIF thingie 2021-09-09 20:28:15 -07:00
Ivan Avdeev
908e54114b Merge remote-tracking branch 'upstream/master' into vulkan 2021-09-09 20:15:13 -07:00
Ivan Avdeev
cfe5612a3a attenuate area lights by projected area, fix #46
Also, tune "tonemapping"
2021-09-08 10:08:47 -07:00
Ivan Avdeev
0839f9673b update todo; move materials draft to separate file 2021-09-06 14:24:36 -07:00
Ivan Avdeev
ae12b4505d remove material flags 2021-09-06 14:24:36 -07:00
Ivan Avdeev
de611e159a assume textures are linear
this way it looks more like traditional renderer w/ lightmaps
2021-09-06 14:24:36 -07:00
Ivan Avdeev
2b2552cd72 fix rad file parsing
parsing strings in c is hard
2021-09-06 14:24:36 -07:00
Ivan Avdeev
86d669c708 enlarge scratch buffer to support more models 2021-09-06 12:03:44 -07:00
Ivan Avdeev
b9f5f87c76 bring back ray traced transparency
1. Probabilistically let ray through material or reflect it based on
   transparency probability (which is essentially just alpha for now).
2. Introduce opaque flag to be able to treat transparent objects as not
   casting shadows. This is not very realistic, but oh well.
2021-09-06 11:57:23 -07:00
2939ab8ea4 wscript: allow compiling with disabled warning-as-error 2021-09-06 00:04:27 +03:00
Ivan Avdeev
9759221e02 rtx: fix linux build 2021-09-04 13:50:05 -07:00
Ivan 'provod' Avdeev
672b2de75a rtx: cascading rad sheets
Read rad data from lights.rad and then mapname.rad
2021-09-04 13:50:05 -07:00
Ivan 'provod' Avdeev
c90187f57f rtx: use a common definition for Kusok; pass color
Also pass alpha (not used yet)
2021-09-04 13:50:05 -07:00
Ivan 'provod' Avdeev
22e76513a4 rtx: better lighting scaling
Remove arbitrary lightness fudge in favor of proper distance scaling.
According to TEH INTERNETS one unit is one inch. So there are 39.37 units per meter.
Scale distances to meters for lighting calculations.
2021-09-04 13:50:05 -07:00
Ivan 'provod' Avdeev
36cfe22e8d rtx: add sbt hit entry w/o any hit
Majority of materials are without alphamask, so no need to have any hit shader
2021-09-04 13:50:05 -07:00
Ivan Avdeev
8cf040f9be rtx: improve emissive surface sampling
Sample a single triangle not in a loop.
2021-09-04 13:50:05 -07:00
Ivan Avdeev
e4aea1486f ingest more of brdf for bounces 2021-09-04 13:50:05 -07:00
Ivan Avdeev
9c330e4118 add brdfs for lights
Just straight copy-paste CC brdf header from Ray Tracing Gems 2 chapter
14.
Use these brdfs for direct lighting.
2021-09-04 13:50:05 -07:00
Ivan Avdeev
d8ebf5ac33 rtx: add emissive color, remove emissive flag 2021-08-31 11:19:44 -07:00
Ivan Avdeev
8d06058aa4 rtx: add first iteration of material flags support
it's clearly suboptimal, but no worries, we'll iterate
2021-08-31 11:19:44 -07:00
Ivan 'provod' Avdeev
0259c09e9a add swizzle for RGBA-BGRA format pair when saving screenshot
this is the pair that breaks on nvidia (yay there's at least one thing that amd is better at!)
2021-08-31 11:19:44 -07:00
Ivan Avdeev
280e6109c6 add screenshots
now vulkan can do screenshots too. however, it depends on blits being
available between swapchain and rgba8 formats, so if it's not the case
for some reason, the resulting image will have mixed components.
2021-08-31 11:19:44 -07:00
Ivan Avdeev
3b605a19b5 fix depth test for glow render mode; comments
also add a lot of observations to ref_vk/TODO.md related to materials
2021-08-31 11:19:44 -07:00
dd90262db2 ci: try to create license file by ourselves 2021-08-27 18:48:48 +03:00
4f8e4b5f64 mainui: update 2021-08-27 18:23:38 +03:00
32068d8090 client: fix wrong paused icon 2021-08-27 18:09:07 +03:00
bd4979f5b0 ci: adding pvs-studio checking 2021-08-27 17:55:33 +03:00
a5e1e9646c mainui: update 2021-08-27 17:47:37 +03:00
013918a371 console: redefine con_color as cvar 2021-08-27 17:05:02 +03:00
Ivan Avdeev
76b82ac884 rtx: calculate maxVertex correctly
after we've updated how brush index buffer references vertices to allow
for draw call coalescing ray tracing broke on amd.
this is because amd cards expect a correct value in
VkAccelerationStructureGeometryTrianglesDataKHR::maxVertex. make sure we
fill a correct value there.
2021-08-18 09:39:33 -07:00
Ivan Avdeev
93cab236ba split device enumeration and creation, fixes #28 2021-08-16 23:22:13 -07:00
Ivan Avdeev
e71a9de057
Merge pull request #30 from w23/brush-concat-drawcalls
concat brush drawcalls
2021-08-15 12:08:06 -07:00
Ivan 'provod' Avdeev
ee8e9d8ff7 concat brush drawcalls
make all geoms share the same constant vertex offset so that continuous indices can be exploited to generate only a single draw call for a group of geometries with the same texture
2021-08-15 11:30:38 -07:00
Ivan Avdeev
584ca32d36
Merge pull request #29 from w23/debug-labels
restore debug labels for traditional renderer
2021-08-15 11:25:49 -07:00
Ivan 'provod' Avdeev
a0a36f5a14 fix c89 2021-08-15 11:14:33 -07:00
Ivan 'provod' Avdeev
dc6b874cae restore debug labels for traditional renderer 2021-08-15 11:02:57 -07:00
Ivan Avdeev
ba761b370d
Merge pull request #27 from w23/aftermath-fix
fix building with aftermath
2021-08-14 19:00:19 -07:00
Ivan Avdeev
31520a7c0b
Merge pull request #26 from w23/better-buffers
join alloc+lock operations on buffer init

also disable ci results uploading, this is at the very best useless
2021-08-14 18:42:56 -07:00
Ivan 'provod' Avdeev
a094088330 ci: do not upload anything
why would you even
uploading many hundreds of megabytes of twice for each PR is not great
2021-08-14 18:33:03 -07:00
Ivan 'provod' Avdeev
fe0223c8d3 fix building with aftermath 2021-08-14 18:30:52 -07:00
Ivan Avdeev
5208219b44 join alloc+lock operations on buffer init
this simplifies the api and implementation
2021-08-11 11:43:33 -07:00
Ivan Avdeev
bd7fc0a981
Merge pull request #25 from w23/studio-lighting
Implement vertex lighting, improve anisotropy detection
2021-08-07 18:59:55 -07:00
Ivan Avdeev
90e5500e83 add per-vertex studio model lighting
it doesn't correctly sample lightmaps for env lighting yet. we'll figure this out some time later ....
2021-08-07 19:56:38 -07:00
Ivan Avdeev
e6f8d8e47a enable anisotropy if available
also force require vulkan 1.2 for now, need to have 1.0 device for testing lower versions (TODO)
2021-08-07 18:06:48 -07:00
Ivan Avdeev
d61dff4849
Merge pull request #24 from w23/hashhub
Better hashes/random for shaders
2021-08-06 12:28:15 -07:00
Ivan Avdeev
27681c1baf
Merge pull request #23 from w23/mips
Add mipmaps for textures
2021-08-06 09:29:16 -07:00
Владислав Сухов
1b20694a1c ci: Fix missing extras in android builds 2021-08-06 13:06:44 +03:00
Ivan Avdeev
0028899eac rtx: add better hashes
from: Mark Jarzynski and Marc Olano, Hash Functions for GPU Rendering, Journal of Computer Graphics Techniques (JCGT), vol. 9, no. 3, 21-38, 2020
http://www.jcgt.org/published/0009/03/02/
2021-08-04 19:32:56 -07:00
Ivan Avdeev
378c1e52e0 enable anisotropy only for rtx
this doesn't make any visible impact for rtx rendering. but does affect non-rtx rendering when running with rtx enabled (kekw)
2021-08-04 18:56:11 -07:00
Ivan Avdeev
94ac51a527 rtx: sample mip levels based on ray cone width
this is mostly copied from ray tracing gems 2 chapter 7 (Texture Coordinate Gradients Estimation for Ray Cones, by Wessam Bahnassi).
There's a weird bit about radians vs degrees. We'll figure it out later when the book becomes available.
2021-08-04 18:36:53 -07:00