File: osp2emb.sh

package info (click to toggle)
embree 4.3.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 100,656 kB
  • sloc: cpp: 228,918; xml: 40,944; ansic: 2,685; python: 812; sh: 635; makefile: 228; csh: 42
file content (29 lines) | stat: -rwxr-xr-x 1,088 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash

## Copyright 2009-2021 Intel Corporation
## SPDX-License-Identifier: Apache-2.0

echo Converting OSPRay code $1 to Embree code $2
cp $1 $2

sed -i.backup 's/math.ih/math.isph/g' $2
sed -i.backup 's/ospray\/math\/vec.ih/..\/math\/vec.isph/g' $2
sed -i.backup 's/Light.ih/light.isph/g' $2
sed -i.backup 's/ospray\/common\/OSPCommon.ih/..\/common.isph/g' $2
sed -i.backup 's/ospray\/math\/sampling.ih/..\/math\/sampling.isph/g' $2
sed -i.backup 's/ospray\/math\/LinearSpace.ih/..\/math\/linearspace.isph/g' $2
sed -i.backup 's/ospray\/common\/DifferentialGeometry.ih/..\/core\/differential_geometry.isph/g' $2
sed -i.backup 's/ospray\/OSPTexture.h/texture.h/g' $2
sed -i.backup 's/Texture2D.ih/texture2d.isph/g' $2

sed -i.backup 's/vec2/Vec2/g' $2
sed -i.backup 's/vec3/Vec3/g' $2
sed -i.backup 's/vec4/Vec4/g' $2
sed -i.backup 's/linear3/LinearSpace3/g' $2

sed -i.backup 's/OSPRay/Embree/g' $2
sed -i.backup 's/OSP_//g' $2
sed -i.backup 's/OSPTexture/Texture/g' $2

sed -i.backup 's/floatbits(0x7F800000)/(1e100f)/g' $2
sed -i.backup 's/floatbits(0xFF800000)/(-1e100f)/g' $2