summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/04-mesh/vs_mesh.sc
blob: 8ca8dbf559c6cd0bb0d618d0ed37cdedca9b171e (plain) (blame)
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
30
31
32
$input a_position, a_normal
$output v_pos, v_view, v_normal, v_color0

/*
 * Copyright 2011-2022 Branimir Karadzic. All rights reserved.
 * License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE
 */

#include "../common/common.sh"

uniform vec4 u_time;

void main()
{
	vec3 pos = a_position;

	float sx = sin(pos.x*32.0+u_time.x*4.0)*0.5+0.5;
	float cy = cos(pos.y*32.0+u_time.x*4.0)*0.5+0.5;
	vec3 displacement = vec3(sx, cy, sx*cy);
	vec3 normal = a_normal.xyz*2.0 - 1.0;

	pos = pos + normal*displacement*vec3(0.06, 0.06, 0.06);

	gl_Position = mul(u_modelViewProj, vec4(pos, 1.0) );
	v_pos = gl_Position.xyz;
	v_view = mul(u_modelView, vec4(pos, 1.0) ).xyz;

	v_normal = mul(u_modelView, vec4(normal, 0.0) ).xyz;

	float len = length(displacement)*0.4+0.6;
	v_color0 = vec4(len, len, len, 1.0);
}
982ea9b87e65b08e77cd940554?s=13&d=retro' /> Vas Crabb2017-08-241-1/+1 | * Move unemulated/imperfect flags from machines into devices. Vas Crabb2017-07-271-10/+27 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now, flags for unemulated/imperfect features apply at system level. This falls over quickly with systems that have slot devices. For example you can plug in a broken sound card or keyboard on a PC or Amiga driver and get no warnings. There's also no way to propagate these flags from a device to all systems using it. This changeset addresses these issues. It's now possible to report unemulated/imperfect features on a device level with static unemulated_feeatures() and imperfect_features() member functions. So far the only thing using this is the votrax device. To support front-ends, this is exposed in -listxml output as a new "feature" element that can appear in system/device descriptions. It has a "type" attribute indicating which feature it is, potentially a "status" attribute if the device itself declares that the feature is unemulated/imperfect, and potentially an "overall" attribute if the device inherits a more severe indication from a subdevice. The embedded DTD describes possible values. Example: device/machine declares imperfect sound: <feature type="sound" status="imperfect"/> Example: device/machine declares unemulated keyboard: <feature type="keyboard" status="unemulated"/> Example: device declares imperfect controls but inherits unemulated controls from a subdevice: <feature type="controls" status="imperfect" overall="unemulated"/> Example: device doesn't declare imperfect LAN but inherits it from a subdevice: <feature type="lan" overall="imperfect"/> It's still possible to add these flags to machines in the GAME/COMP/CONS macro. If the state class declares them with static member functions, the two sources will be combined. If you subclass a device, you inherit its flags if you don't redefine the relevant static member functions (no override qualifier is necessary since they're static). The UI has been updated to display appropriate warnings for the overall machine configuration, including selected slot devices, at launch time. The menus don't display overall status, only status for the machine itself. We can make it scan subdevices if we decide that's desirable, it just needs caching to enure we don't take a huge performance hit. * remove this check - it causes MSVC release builds to crash, and the things ↵ Vas Crabb2017-07-151-65/+56 | | | | it flags usually get detected elsewhere (nw) * Should be slightly more efficient this way (nw) AJR2017-06-101-4/+7 | * Further improvements to slot option validation (nw) AJR2017-06-101-36/+33 | | | | | - All slot options are now validated whether or not they are user-selectable. This has already exposed a bug in one MSX-Audio device. - Slots within slots, however, get added for validation only if they are declared fixed. Various Commodore floppy drives have been affected by this, since it doesn't look as if the current FDC emulation allows for detachability. * fix the missing default subslot devices on slot card validation Vas Crabb2017-06-111-2/+21 | * Fix region validation for slot devices (nw) AJR2017-06-101-3/+4 | * improve code for instantiating slot devices for validation - still doesn't ↵ Vas Crabb2017-06-111-2/+14 | | | | find regions properly, need to work out why * Attempt basic validation of slot cards