Compare commits

..

6 Commits

Author SHA1 Message Date
NightFox ef4d806752 add optimization for animation via viewport IntersectionObserver 2024-02-14 17:18:57 +03:00
NightFox e1ad61e061 add standalone emoji fonts, etc minor changes 2024-02-13 16:49:57 +03:00
NightFox f1885f49ec update 2024-02-13 15:50:32 +03:00
NightFox b77314401a update 2024-02-13 02:10:45 +03:00
NightFox 939aa912ed my bad 2024-02-12 22:36:25 +03:00
NightFox 8b075645e7 new design for rendertest 2024-02-12 17:00:30 +03:00
247 changed files with 793 additions and 1530 deletions
-2
View File
@@ -1,5 +1,3 @@
*.sav filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.woff2 filter=lfs diff=lfs merge=lfs -text
-1
View File
@@ -1,4 +1,3 @@
render/work
imagecompare
rendertest.script
container/Half-Life
-67
View File
@@ -1,67 +0,0 @@
FROM ubuntu-hlsdk
# Avoid interactive prompts during package installation
ENV DEBIAN_FRONTEND=noninteractive
ENV VULKAN_SDK_VERSION=1.4.341.1
USER root
RUN apt-get update && apt-get full-upgrade -y && apt-get autoremove -y
# Install system dependencies and development packages
RUN apt-get install --no-install-recommends --no-install-suggests -y \
libsdl2-dev \
libfreetype-dev \
\
# FFmpeg development packages
libavcodec-dev \
libavformat-dev \
libavutil-dev \
libavfilter-dev \
libavdevice-dev \
libswscale-dev \
libswresample-dev \
libpostproc-dev \
ffmpeg \
\
# Running render tests
weston \
libgl1-mesa-dri \
mesa-vulkan-drivers \
libvulkan1 \
imagemagick
# Install Vulkan SDK runtime dependencies only
#RUN apt-get update && apt-get install -y \
# libxcb-xinput0 libxcb-xinerama0 libxcb-cursor-dev
# Install Vulkan SDK
RUN mkdir -p /opt/VulkanSDK && wget -qO- \
https://sdk.lunarg.com/sdk/download/${VULKAN_SDK_VERSION}/linux/vulkansdk-linux-x86_64-${VULKAN_SDK_VERSION}.tar.xz | \
tar -xJ -C /opt/VulkanSDK/
ENV VULKAN_SDK=/opt/VulkanSDK/${VULKAN_SDK_VERSION}/x86_64
ENV PATH=$VULKAN_SDK/bin:$PATH
ENV LD_LIBRARY_PATH="$VULKAN_SDK/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
ENV VK_ADD_LAYER_PATH="$VULKAN_SDK/share/vulkan/explicit_layer.d${VK_ADD_LAYER_PATH:+:$VK_ADD_LAYER_PATH}"
ENV PKG_CONFIG_PATH="$VULKAN_SDK/share/pkgconfig:$VULKAN_SDK/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
# Common dev utils
RUN apt-get install --no-install-recommends --no-install-suggests -y \
ripgrep \
less \
fd-find
# Remove extra cache after all the installations
RUN rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /build
COPY build-and-test.sh /build/
# Switch to non-root user
USER ubuntu
# Default command
WORKDIR /build
CMD ["/build/build-and-test.sh"]
-48
View File
@@ -1,48 +0,0 @@
FROM ubuntu:24.04
# This cannot reference external dirs, unfortunately
ARG HALFLIFE_STEAM_FILES=./Half-Life
# Copy HL data files
RUN mkdir -p /opt/hl && chown ubuntu:ubuntu /opt/hl
COPY --chown=ubuntu:ubuntu ${HALFLIFE_STEAM_FILES}/valve /opt/hl/valve
COPY --chown=ubuntu:ubuntu ${HALFLIFE_STEAM_FILES}/valve_hd /opt/hl/valve_hd
ENV DEBIAN_FRONTEND=noninteractive
# Install generic build dependencies
RUN apt-get update && apt-get install --no-install-recommends --no-install-suggests -y \
\
# Build essential utilities
ca-certificates \
wget \
build-essential \
pkg-config \
python3 \
git
# Build FWGS hlsdk game libs
ARG FWGS_HLSDK_REF=ae84bfc0c3598fcff605a7b3bb963abe8ec3e295
RUN mkdir -p /build && chown ubuntu:ubuntu /build
USER ubuntu
RUN cd /build && \
git version && \
# git > 2.49: git clone --depth 1 --revision ${FWGS_HLSDK_REF} https://github.com/FWGS/hlsdk-portable && \
mkdir -p hlsdk-portable && \
cd hlsdk-portable && \
git init && \
git remote add origin https://github.com/FWGS/hlsdk-portable && \
git fetch --depth 1 origin ${FWGS_HLSDK_REF} && \
git checkout FETCH_HEAD && \
./waf \
configure -8 -T release \
build \
install --destdir=/opt/hl
# Cleanup build files
RUN rm -rf /build/hlsdk-portable
# At this point there's:
# /opt/hl with
# ./valve
# {dlls, cl_dlls} with fwgs/hlsdk libs
-33
View File
@@ -1,33 +0,0 @@
#!/bin/bash
set -eux
echo DESTINATION_IS_WRITABLE > /opt/hl/testfile
XDG_RUNTIME_DIR=/tmp weston \
--backend=headless \
--renderer=gl \
--width=1280 \
--height=800 \
--socket=wayland-headless &
build() {
pushd /build/xash3d-fwgs
./waf configure -T release -8 \
build \
install --destdir=/opt/hl
popd
}
rendertest() {
pushd /build/HLRTest/render
WAYLAND_DISPLAY=/tmp/wayland-headless ./rendertest.py \
--xash-dir /opt/hl \
--xash-revision "${XASH3D_REVISION}" \
--pbr-revision "${PBR_REVISION}" \
--tests-revision "${HLRTEST_REVISION}" \
run
popd
}
time build
time rendertest
-5
View File
@@ -1,5 +0,0 @@
# Path to https://rtxash.omgwtf.ru/Half-Life-RTX/Half-Life-PBR repo clone (readonly)
HALFLIFE_PBR_REPO_DIR=${HOME}/src/Half-Life-PBR
# Path to https://github.com/w23/xash3d-fwgs/ clone (readonly)
XASH3D_RT_REPO_DIR=${HOME}/src/xash3d-fwgs
-93
View File
@@ -1,93 +0,0 @@
#!/bin/bash
set -eux
# just podman things
export DBUS_SESSION_BUS_ADDRESS=
NAME=xash-builder
HLRTEST_REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. && pwd)"
source .env
build-image-hlsdk() {
podman build -t ubuntu-hlsdk -f Containerfile.hlsdk
}
build-image() {
podman build -t ubuntu-xash-builder -f Containerfile
}
build() {
build-image-hlsdk
build-image
}
git_short() {
local dir="${1:-.}"
local hash dirty_flag
# Get short commit hash
hash=$(cd "$dir" && git rev-parse --short HEAD 2>/dev/null)
if [[ -z "$hash" ]]; then
echo "Not a git repository" >&2
return 1
fi
# Check for uncommitted changes (staged or unstaged)
dirty_flag=$(cd "$dir" && git status --porcelain --untracked-files=no 2>/dev/null)
if [[ -n "$dirty_flag" ]]; then
echo "${hash}-dirty"
else
echo "$hash"
fi
}
render-test() {
local OUTPUT="${HLRTEST_REPO_DIR}/render/work"
mkdir -p "${OUTPUT}"
local HLRTEST_REVISION=$(git_short "${HLRTEST_REPO_DIR}")
local XASH3D_REVISION=$(git_short "${XASH3D_RT_REPO_DIR}")
local PBR_REVISION=$(git_short "${HALFLIFE_PBR_REPO_DIR}")
# Make sure the image's ubuntu (uid=1000) user can write to the output
#chmod -R o+rw "${OUTPUT}"
podman run -it --rm \
--name ${NAME} \
--userns=keep-id:uid=1000,gid=1000 \
\
--cap-drop=ALL \
--security-opt=no-new-privileges \
--read-only \
--tmpfs /tmp \
\
-e HLRTEST_REVISION="${HLRTEST_REVISION}" \
-e XASH3D_REVISION="${XASH3D_REVISION}" \
-e PBR_REVISION="${PBR_REVISION}" \
\
-v /dev/dri/renderD128:/dev/dri/renderD128:ro \
-v /etc/localtime:/etc/localtime:ro \
\
-v /opt/hl \
-v /home/ubuntu \
-v ${HALFLIFE_PBR_REPO_DIR}/valve/pbr:/opt/hl/valve/pbr:ro \
-v ${HALFLIFE_PBR_REPO_DIR}/valve/bluenoise:/opt/hl/valve/bluenoise:ro \
\
-v ${XASH3D_RT_REPO_DIR}:/build/xash3d-fwgs:O \
\
-v ${HLRTEST_REPO_DIR}:/build/HLRTest:O \
-v ${OUTPUT}:/build/HLRTest/render/work \
\
ubuntu-xash-builder:latest \
"$@"
}
shell() {
podman exec -it ${NAME} /bin/bash
}
time "$@"
+1 -1
View File
@@ -1,2 +1,2 @@
imagecompare: imagecompare.c stb_image.h stb_image_write.h Makefile
${CC} -O3 -ggdb3 -march=native -Wall -Werror -pedantic -o imagecompare imagecompare.c -lm
${CC} -O3 -ggdb3 -march=native -Wall -Werror -pedantic -lm -o imagecompare imagecompare.c
+27 -170
View File
@@ -4,8 +4,12 @@
}
@font-face {
font-family: "OpenMojiDemoFont";
src: url("./fonts/OpenMoji/OpenMoji-color-colr1_svg.woff2") format("woff2");
src: url("./fonts/OpenMoji/OpenMoji-color-colr1_svg.ttf");
}
/*@font-face {
font-family: "OpenMojiDemoFont";
src: url("OpenMoji-color-colr1_svg.woff2") format("woff2");
}*/
@font-face {
font-family: "Twemoji Mozilla Built";
src: url("./fonts/Mozilla/Twemoji.Mozilla.ttf");
@@ -24,53 +28,21 @@ html, body {
*, *:before, *:after {
box-sizing: inherit;
}
h1:first-child,h2:first-child,h3:first-child,h4:first-child,h5:first-child {
h1,h2,h3,h4,h5 {
margin-top: 0;
}
.emoji {
font-family: "Noto Color Emoji", sans-serif;
/*font-family: "Twemoji Mozilla Built", sans-serif;*/
/*font-family: "Noto Color Emoji", sans-serif;*/
font-family: "OpenMojiDemoFont", sans-serif;
font-family: "Twemoji Mozilla Built", sans-serif;
font-size: 16px;
font-weight: 400;
font-style: normal;
position: relative;
/*top: 1px; /* Twemoji */
}
.emoji:after {
font-variant-emoji: emoji; /* experimental feature and only in firefox :( */
font-variant-emoji: emoji; /* experimental and only in firefox :( */
content: '\FE0F'; /* fuck off, give me emoji // https://codepoints.net/U+FE0F */
}
.emoji.Twemoji {
font-family: "Twemoji Mozilla Built", sans-serif;
font-size: 16px;
top: 2px;
}
.emoji.Noto {
font-family: "Noto Color Emoji", sans-serif;
font-size: 14px;
/*left: -1px;*/
top: 0px;
}
.emoji.OpenMoji {
font-family: "OpenMojiDemoFont", sans-serif;
font-size: 17px;
left: -2px;
top: 0px;
color: #888; /* fix outline */
}
.emoji.OpenMoji + .text-left-margin {
margin-left: 0;
}
.emoji.Noto + .text-left-margin {
margin-left: 5px;
}
.sidebar .emoji.Noto + .emoji.Noto {
margin-left: 4px;
}
footer {
text-align: center;
@@ -161,27 +133,17 @@ table, tr, td, th {
display: grid;
grid-gap: 2px;
align-items: stretch;
align-content: baseline;
}
.sidebar h2 {
font-size: 17px;
}
#options {
height: var(--options-height);
}
#table { }
#fail_images {
display: grid;
justify-content: left;
}
#fail_images.center,
.grid-container.reversed #fail_images.center{
justify-content: center;
}
.grid-container.reversed #fail_images {
justify-content: right;
}
.panel {
display: block;
@@ -199,27 +161,23 @@ table, tr, td, th {
.content {
grid-area: content;
overflow: auto;
padding: 0px 10px;
justify-content: center;
}
body.mini { /* split feature */
body.min { /* split feature */
width: 75%; margin: 0 auto; /* FIXME */
}
.mini .sidebar {
.min .sidebar {
font-size: 12px;
/*font-weight: bold;*/
}
.mini .sidebar .panel > div {
.min .sidebar .panel > div {
line-height: 20px;
}
.mini .sidebar #options.panel {
.min .sidebar #options.panel {
height: var(--options-height-min);
}
@keyframes flash {
0% {
z-index: 1;
@@ -286,45 +244,11 @@ body.mini { /* split feature */
position: absolute;
animation: flash var(--animation-duration) infinite;
}
.block-gold.anim_off,
.block-gold.anim_force_off,
.all_diff .block-gold,
.split_compare .block-gold{
.block-gold.anim_off {
animation: none;
}
.split_compare .image-container {
cursor: col-resize;
}
.split_compare .block-gold {
overflow: hidden;
width: 50%;
position: absolute;
z-index: 10;
}
.split_compare .separator {
width: 1px;
height: 100%;
cursor: col-resize;
position: absolute;
top: 0;
left: 50%;
z-index: 10;
backdrop-filter: invert(1);
}
.split_compare .block-test:after {
left: auto;
right: 25px;
}
:root {
--animation-duration: 0.7s;
--height-image: calc((100vh - 800px) / 2);
@@ -335,34 +259,23 @@ body.mini { /* split feature */
position: relative;
}
.meta-block h3 {
.meta-block h2 {
/*display: none;*/
font-family: monospace;
/*font-family: "Gill Sans", sans-serif;*/
padding-top: 10px;
margin-top: revert;
/*font-size: 150%;*/
font-size: 1.5em;
}
.meta-block h3:before {
.meta-block h2:before {
content: "🎯\FE0F"; /* for hedging her bets; see .emoji for details */
}
.text-link {
text-decoration: none;
}
#fail_images.vpadding .meta-block {
#fail_images.padding .meta-block {
/*margin-block: 100vh;*/
padding-top: calc(var(--height-image));
padding-bottom: 2px;
/*padding-bottom: calc(50% - var(--height-image) );*/
}
#fail_images.vpadding .meta-block:last-child {
padding-top: calc(var(--height-image));
padding-bottom: calc(var(--height-image));
}
#fail_images.vpadding .meta-block h3, .meta-block:first-child h3 {
#fail_images.padding .meta-block h2, .meta-block:first-child h2 {
border-top: none;
}
@@ -374,27 +287,14 @@ body.mini { /* split feature */
/*z-index: 10;*/
}
.block-diff.show_diff,
.all_diff .block-diff {
.block-diff.show_diff {
display: block;
z-index: 2;
}
.diff_separate .block-diff {
display: block;
position: relative;
top: auto;
}
.image-container, img, .block {
max-width: 100%;
user-select: none;
}
/* TODO: исправить конфликт с image split compare */
.split_compare .image-container,
.split_compare img,
.split_compare .block {
max-width: unset;
}
table {
@@ -422,46 +322,14 @@ th {
}
th.table-sticky {
position: sticky;
top: 2.7em; /* FIXME */
}
.mini th.table-sticky {
position: sticky;
top: 3.53em; /* FIXME */
top: 0;
}
#options.sticky + #table th.table-sticky {
top: calc(var(--options-height) + 2.74em); /* FIXME */
top: calc(var(--options-height) + 0.07em); /* FIXME */
}
.mini .sidebar #options.sticky + #table th.table-sticky {
top: calc(var(--options-height-min) + 3.50em); /* FIXME */
.min .sidebar #options.sticky + #table th.table-sticky {
top: calc(var(--options-height-min) + 0.07em); /* FIXME */
}
.filter {
display: block;
padding: 10px 4px;
font-size: 16px;
font-weight: bold;
}
.filter * {
font-weight: normal;
}
.mini .filter {
font-size: 12px;
}
#options.sticky + #table .filter.sticky {
top: calc(var(--options-height) + 0.0em); /* FIXME */
}
.mini .sidebar #options.sticky + #table .filter.sticky {
top: calc(var(--options-height-min) + 0.0em); /* FIXME */
}
.filter input {
margin-left: 10px;
}
#options .filter.sticky {
}
input[type=range] { vertical-align: middle; }
@@ -504,15 +372,4 @@ details[open] summary:before {
.green {
color: #6b9a00;
color: oklch(62.8% 0.25768330773615683 128.19);
}
table th:nth-child(3) {
text-align: center;
}
table td:nth-child(3) { /* Δ, % // TODO: add class */
text-align: right;
font-family: Consolas, monospace;
}
table td:nth-child(4) { /* Passed // TODO: add class */
text-align: center;
}
}
-50
View File
@@ -1,50 +0,0 @@
## License for the Code
Copyright 2016-2018, Mozilla Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
## License for the Visual Design
The Emoji art in the twe-svg.zip archive comes from [Twemoji](https://twitter.github.io/twemoji),
and is used and redistributed under the CC-BY-4.0 [license terms](https://github.com/twitter/twemoji#license)
offered by the Twemoji project.
### Creative Commons Attribution 4.0 International (CC BY 4.0)
https://creativecommons.org/licenses/by/4.0/legalcode
or for the human readable summary: https://creativecommons.org/licenses/by/4.0/
#### You are free to:
**Share** — copy and redistribute the material in any medium or format
**Adapt** — remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.
#### Under the following terms:
**Attribution** — You must give appropriate credit, provide a link to the license,
and indicate if changes were made.
You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
**No additional restrictions** — You may not apply legal terms or **technological measures**
that legally restrict others from doing anything the license permits.
#### Notices:
You do not have to comply with the license for elements of the material in the public domain
or where your use is permitted by an applicable exception or limitation. No warranties are given.
The license may not give you all of the permissions necessary for your intended use.
For example, other rights such as publicity, privacy, or moral rights may limit how you use the material.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More