mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 06:19:19 +02:00
fix(tools): a skin material without a suffix is reported as unused when its ,1 ,2 versions exist, since the game loads those instead, so the 64 missing textures of the ELF were never missing in the game; param_specular in a shader without a sun highlight changes nothing and is only reported as information
This commit is contained in:
@@ -80,7 +80,7 @@ python3 tools/materials/validate_materials.py ~/pctga dynamic --fallback <katalo
|
||||
| `--info` | pokazuje też informacje, nie tylko błędy i uwagi |
|
||||
| `-j N` | liczba procesów, domyślnie wszystkie rdzenie; cały pctga trwa ok. 80 s |
|
||||
|
||||
Sprawdza pliki `.mat` (w pctga są w `dynamic` i `textures`); tekstury bez `.mat` idą na samym diffuse i nie ma czego w nich sprawdzać. Woda (`shader: water`) ma stałe lustro, jej duży `param_specular` daje odblask słońca i jest tylko informacją.
|
||||
Sprawdza pliki `.mat` (w pctga są w `dynamic` i `textures`); tekstury bez `.mat` idą na samym diffuse i nie ma czego w nich sprawdzać. `.mat` skóry bez sufiksu, obok którego są wersje `,1`, `,2`…, gra pomija (bierze wersje z sufiksem, `material_data::assign` w `vehicle/DynObj.cpp`), więc walidator oznacza go jako nieużywany. `param_specular` w shaderze bez połysku słońca (np. `default` szyb) nic nie zmienia i jest tylko informacją. Woda (`shader: water`) ma stałe lustro, jej duży `param_specular` daje odblask słońca i jest tylko informacją.
|
||||
|
||||
Wynik: dla każdego materiału z problemem ścieżka `.mat`, shader i lista komunikatów, na końcu podsumowanie.
|
||||
|
||||
|
||||
@@ -255,6 +255,8 @@ def check(mat, values, nested, shaders, resolver, images, rel):
|
||||
add(INFO, 'param_specular nie ustawiony, bierze jasnosc specular submodelu z e3d/t3d')
|
||||
if ps is not None and ps > PARAM_SPECULAR_MAX and shadername.lower().startswith('water'):
|
||||
add(INFO, 'param_specular %g w shaderze %s: odblask slonca na lustrze wody, poza norma' % (ps, shadername))
|
||||
elif ps is not None and ps > PARAM_SPECULAR_MAX and shader['spec'] == 'none':
|
||||
add(INFO, 'param_specular %g w shaderze %s bez polysku slonca: nic nie zmienia (w starszych shaderach rozjasnia w reflektorach)' % (ps, shadername))
|
||||
elif ps is not None and ps > PARAM_SPECULAR_MAX:
|
||||
add(ERROR if ps > 2 * PARAM_SPECULAR_MAX else WARN,
|
||||
'param_specular %g mnozy polysk %gx (norma 1, sile niesie R; w starszych shaderach rozjasnia tez w reflektorach)' % (ps, ps))
|
||||
@@ -387,6 +389,9 @@ def check_group(mats):
|
||||
images = WORKER['images']
|
||||
for mat in mats:
|
||||
rel = os.path.relpath(mat, WORKER['gamedir'])
|
||||
if ',' not in os.path.basename(mat) and os.path.isfile(mat[:-4] + ',1.mat'):
|
||||
results.append((rel, '-', [(INFO, 'nieuzywany: skora %s ma wersje ,1 ,2..., ktore gra bierze zamiast niego' % os.path.basename(mat)[:-4])]))
|
||||
continue
|
||||
try:
|
||||
values, nested = parse_mat(mat)
|
||||
shadername, findings = check(mat, values, nested, WORKER['shaders'], WORKER['resolver'], images, rel)
|
||||
|
||||
Reference in New Issue
Block a user